Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / ValueType.cs / 1 / 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; [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
- WebPartDescriptionCollection.cs
- WebPartUtil.cs
- FileLoadException.cs
- SettingsAttributes.cs
- DataTemplateKey.cs
- TargetConverter.cs
- FtpWebResponse.cs
- Vars.cs
- TemplateParser.cs
- TypeGeneratedEventArgs.cs
- ToolStripOverflowButton.cs
- ToolStripPanelRow.cs
- listitem.cs
- Trigger.cs
- HttpCachePolicyElement.cs
- GroupQuery.cs
- DbConnectionStringBuilder.cs
- MappingSource.cs
- SmtpFailedRecipientException.cs
- AutomationPeer.cs
- ListViewGroupConverter.cs
- CommonProperties.cs
- BatchParser.cs
- WebSysDisplayNameAttribute.cs
- SharedStatics.cs
- FrameworkElementAutomationPeer.cs
- XmlSchemaAttributeGroupRef.cs
- X509UI.cs
- GridViewRow.cs
- ParallelEnumerable.cs
- NativeMethods.cs
- InvalidContentTypeException.cs
- XmlEntityReference.cs
- Int32CAMarshaler.cs
- __Filters.cs
- TextRangeSerialization.cs
- GridErrorDlg.cs
- PersonalizationProviderHelper.cs
- X509UI.cs
- ListenerElementsCollection.cs
- NativeObjectSecurity.cs
- Wizard.cs
- ParenthesizePropertyNameAttribute.cs
- GZipDecoder.cs
- DbMetaDataCollectionNames.cs
- PersonalizationDictionary.cs
- DigitShape.cs
- EventListener.cs
- Brush.cs
- AssemblyHash.cs
- PropertyRef.cs
- WebPartAuthorizationEventArgs.cs
- FillRuleValidation.cs
- SortAction.cs
- UIAgentInitializationException.cs
- OptimalTextSource.cs
- ConfigurationProperty.cs
- DataColumn.cs
- InteropBitmapSource.cs
- Font.cs
- DynamicValidatorEventArgs.cs
- PackageProperties.cs
- JsonReader.cs
- ThumbAutomationPeer.cs
- TextDecorationCollectionConverter.cs
- FixedSOMElement.cs
- ItemContainerGenerator.cs
- ErrorWrapper.cs
- StyleSheetComponentEditor.cs
- NodeCounter.cs
- HttpPostProtocolReflector.cs
- XmlQualifiedName.cs
- AttributeXamlType.cs
- WorkflowViewManager.cs
- InputLanguageSource.cs
- XXXInfos.cs
- CultureMapper.cs
- XmlSchemaImporter.cs
- WebScriptClientGenerator.cs
- FixedSOMPageElement.cs
- NetNamedPipeSecurityElement.cs
- ObjectTag.cs
- Effect.cs
- XsltSettings.cs
- UserMapPath.cs
- NativeObjectSecurity.cs
- WindowsFormsSectionHandler.cs
- BrowserDefinition.cs
- GenericUriParser.cs
- GeometryConverter.cs
- ReflectionTypeLoadException.cs
- ImplicitInputBrush.cs
- SafeRightsManagementHandle.cs
- COM2AboutBoxPropertyDescriptor.cs
- HGlobalSafeHandle.cs
- HttpModule.cs
- Trigger.cs
- CallbackValidatorAttribute.cs
- DataKey.cs
- Thread.cs