Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ActiveDocumentEvent.cs
- DocumentGridPage.cs
- GeneratedContractType.cs
- StrongNamePublicKeyBlob.cs
- JsonXmlDataContract.cs
- Symbol.cs
- Privilege.cs
- CryptoSession.cs
- InlineCollection.cs
- LinkClickEvent.cs
- MembershipAdapter.cs
- DateTimeOffsetConverter.cs
- SqlLiftIndependentRowExpressions.cs
- ActivityTypeResolver.xaml.cs
- SuppressMergeCheckAttribute.cs
- AspNetSynchronizationContext.cs
- XsdValidatingReader.cs
- ContextInformation.cs
- SystemIPInterfaceStatistics.cs
- ReflectionPermission.cs
- XmlSchemaValidator.cs
- XmlWrappingWriter.cs
- GenericEnumerator.cs
- BufferedGraphicsContext.cs
- AssemblyBuilderData.cs
- ClockGroup.cs
- TextOptionsInternal.cs
- ContractsBCL.cs
- ActionItem.cs
- DefaultWorkflowLoaderService.cs
- NavigationProperty.cs
- UrlUtility.cs
- TiffBitmapDecoder.cs
- BindingCompleteEventArgs.cs
- JsonWriter.cs
- Inflater.cs
- WindowsTreeView.cs
- _ContextAwareResult.cs
- CompositeCollection.cs
- Int32RectValueSerializer.cs
- ObjectToModelValueConverter.cs
- TrackingRecordPreFilter.cs
- RequestCachingSection.cs
- Metadata.cs
- OracleParameterBinding.cs
- WebPart.cs
- PersonalizationProviderCollection.cs
- PasswordDeriveBytes.cs
- XmlLangPropertyAttribute.cs
- CodePageUtils.cs
- DesignTableCollection.cs
- metadatamappinghashervisitor.cs
- CacheDependency.cs
- DbParameterHelper.cs
- SHA512Managed.cs
- LocalizationParserHooks.cs
- NetWebProxyFinder.cs
- CanonicalXml.cs
- CancelAsyncOperationRequest.cs
- PenThreadPool.cs
- WindowsTitleBar.cs
- LogoValidationException.cs
- ProfessionalColors.cs
- ScriptingScriptResourceHandlerSection.cs
- EntityClientCacheEntry.cs
- XmlMapping.cs
- XsdDataContractExporter.cs
- EntryWrittenEventArgs.cs
- Membership.cs
- ControlBindingsCollection.cs
- oledbmetadatacollectionnames.cs
- Cursors.cs
- NullEntityWrapper.cs
- ProviderMetadata.cs
- XPathDocumentIterator.cs
- IItemProperties.cs
- Function.cs
- HtmlElementErrorEventArgs.cs
- DependencyStoreSurrogate.cs
- SEHException.cs
- NumericUpDownAcceleration.cs
- StringFunctions.cs
- ProvidePropertyAttribute.cs
- DataTablePropertyDescriptor.cs
- DbCommandDefinition.cs
- WindowsGraphics2.cs
- DbProviderFactory.cs
- StatusStrip.cs
- RadioButton.cs
- FormsAuthenticationEventArgs.cs
- WindowsIPAddress.cs
- PropertySourceInfo.cs
- SQLResource.cs
- WebReferencesBuildProvider.cs
- ConnectorDragDropGlyph.cs
- SecurityContextSecurityTokenResolver.cs
- DllNotFoundException.cs
- SessionEndingEventArgs.cs
- CommandField.cs
- __ComObject.cs