Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- HTMLTextWriter.cs
- DataGridPreparingCellForEditEventArgs.cs
- TextTreeUndo.cs
- ParserStreamGeometryContext.cs
- AutomationPeer.cs
- MaskedTextProvider.cs
- LinearQuaternionKeyFrame.cs
- SignedInfo.cs
- _NegoState.cs
- MissingSatelliteAssemblyException.cs
- _ShellExpression.cs
- ContravarianceAdapter.cs
- SQLMoneyStorage.cs
- SessionKeyExpiredException.cs
- ArrayItemReference.cs
- ReliableDuplexSessionChannel.cs
- CancelRequestedQuery.cs
- LocatorManager.cs
- SQLBoolean.cs
- DummyDataSource.cs
- WrappedIUnknown.cs
- RubberbandSelector.cs
- PersonalizationStateQuery.cs
- httpstaticobjectscollection.cs
- MetadataItem_Static.cs
- shaperfactoryquerycachekey.cs
- XPathEmptyIterator.cs
- X509Utils.cs
- SqlNodeAnnotation.cs
- PerformanceCounterManager.cs
- LayoutEvent.cs
- EventPropertyMap.cs
- DataGridTableCollection.cs
- XmlSchemaAttributeGroupRef.cs
- CompModSwitches.cs
- FontSizeConverter.cs
- XsltInput.cs
- DescendentsWalkerBase.cs
- StringSource.cs
- HttpModuleAction.cs
- StreamWriter.cs
- SourceChangedEventArgs.cs
- FormatException.cs
- CancellationTokenSource.cs
- PathSegment.cs
- DocumentPageViewAutomationPeer.cs
- SchemaInfo.cs
- DataKeyArray.cs
- PointLight.cs
- DbInsertCommandTree.cs
- EditorPartChrome.cs
- CommandHelper.cs
- CodeSnippetTypeMember.cs
- updatecommandorderer.cs
- DataServiceQueryProvider.cs
- GridViewCommandEventArgs.cs
- UIElement3DAutomationPeer.cs
- SqlGatherConsumedAliases.cs
- SmiEventSink_Default.cs
- ImmutableClientRuntime.cs
- IsolatedStorageFile.cs
- Collection.cs
- PlacementWorkspace.cs
- CatalogZone.cs
- DataGridViewComponentPropertyGridSite.cs
- TemplateInstanceAttribute.cs
- sqlmetadatafactory.cs
- MultiPartWriter.cs
- IisTraceWebEventProvider.cs
- Error.cs
- EncoderFallback.cs
- DictionarySectionHandler.cs
- Authorization.cs
- TypeInfo.cs
- QueryValue.cs
- WindowsTokenRoleProvider.cs
- EventLogInformation.cs
- DataRelationCollection.cs
- LockedHandleGlyph.cs
- CookielessHelper.cs
- RegisterInfo.cs
- SourceSwitch.cs
- FileStream.cs
- PageAsyncTaskManager.cs
- ProviderCommandInfoUtils.cs
- CriticalExceptions.cs
- GuidConverter.cs
- PropertyInformation.cs
- GuidTagList.cs
- ElementFactory.cs
- DefaultEventAttribute.cs
- FindCriteriaCD1.cs
- XmlDictionaryReader.cs
- ImageEditor.cs
- WsrmFault.cs
- ChooseAction.cs
- TagPrefixCollection.cs
- Missing.cs
- APCustomTypeDescriptor.cs
- GlobalAllocSafeHandle.cs