Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / ValueType.cs / 1305376 / ValueType.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: ValueType ** ** ** Purpose: Base class for all value classes. ** ** ===========================================================*/ namespace System { using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public abstract class ValueType { public override bool Equals (Object obj) { BCLDebug.Perf(false, "ValueType::Equals is not fast. "+this.GetType().FullName+" should override Equals(Object)"); if (null==obj) { return false; } RuntimeType thisType = (RuntimeType)this.GetType(); RuntimeType thatType = (RuntimeType)obj.GetType(); if (thatType!=thisType) { return false; } Object thisObj = (Object)this; Object thisResult, thatResult; // if there are no GC references in this object we can avoid reflection // and do a fast memcmp if (CanCompareBits(this)) return FastEqualsCheck(thisObj, obj); FieldInfo[] thisFields = thisType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); for (int i=0; i
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ActiveXHost.cs
- MenuItemStyle.cs
- XmlDocumentSchema.cs
- SmiContext.cs
- PropertyGroupDescription.cs
- COM2PropertyPageUITypeConverter.cs
- HwndMouseInputProvider.cs
- wgx_sdk_version.cs
- WindowsIdentity.cs
- CodeCastExpression.cs
- CorrelationManager.cs
- WindowsListViewSubItem.cs
- DataGridViewTextBoxCell.cs
- CharacterString.cs
- SqlFormatter.cs
- ManipulationStartedEventArgs.cs
- PropagatorResult.cs
- SoapAttributes.cs
- SharedPerformanceCounter.cs
- Renderer.cs
- XmlSchemaFacet.cs
- TextEditorMouse.cs
- DBCommandBuilder.cs
- DrawItemEvent.cs
- TableLayoutSettingsTypeConverter.cs
- NativeMethods.cs
- VisualStyleInformation.cs
- FixUp.cs
- sqlstateclientmanager.cs
- DbProviderServices.cs
- BlockUIContainer.cs
- AttributeAction.cs
- ContentFileHelper.cs
- DataBindEngine.cs
- DataGridRow.cs
- GroupQuery.cs
- WinEventQueueItem.cs
- SmiXetterAccessMap.cs
- DragDeltaEventArgs.cs
- SqlCacheDependency.cs
- ResourceManager.cs
- EventSource.cs
- cookieexception.cs
- XmlSchemaGroup.cs
- PartEditor.cs
- Parser.cs
- GridEntry.cs
- FontStyles.cs
- HttpApplicationStateWrapper.cs
- ButtonAutomationPeer.cs
- WebControlAdapter.cs
- ContentIterators.cs
- ListView.cs
- Int32Rect.cs
- SolidColorBrush.cs
- ExpressionCopier.cs
- WindowsAltTab.cs
- FormsAuthenticationUser.cs
- ListViewPagedDataSource.cs
- NativeMethods.cs
- MenuAdapter.cs
- Dynamic.cs
- EventMappingSettings.cs
- ImageField.cs
- GAC.cs
- EnumType.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- ReadingWritingEntityEventArgs.cs
- MetadataArtifactLoaderComposite.cs
- AddDataControlFieldDialog.cs
- TabOrder.cs
- RegexParser.cs
- precedingsibling.cs
- DefinitionBase.cs
- SizeAnimationClockResource.cs
- Menu.cs
- EmulateRecognizeCompletedEventArgs.cs
- InertiaTranslationBehavior.cs
- DriveNotFoundException.cs
- PasswordRecovery.cs
- ValidationEventArgs.cs
- JavaScriptSerializer.cs
- Polygon.cs
- ConnectionStringSettings.cs
- RootDesignerSerializerAttribute.cs
- SymLanguageType.cs
- _TimerThread.cs
- ItemCheckEvent.cs
- NodeLabelEditEvent.cs
- WebPartTransformerCollection.cs
- PointCollection.cs
- UnhandledExceptionEventArgs.cs
- XmlNamedNodeMap.cs
- UnsafeNativeMethods.cs
- HtmlGenericControl.cs
- DataGridViewCellValidatingEventArgs.cs
- ReaderWriterLockWrapper.cs
- OleDbConnection.cs
- InvokeAction.cs
- OrderedDictionary.cs