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
- ElementHostAutomationPeer.cs
- WebBrowserPermission.cs
- SpeechRecognizer.cs
- MimeMultiPart.cs
- GridSplitterAutomationPeer.cs
- DetailsView.cs
- AuthenticatedStream.cs
- PageParserFilter.cs
- FileSecurity.cs
- Label.cs
- SortedList.cs
- FixedPage.cs
- DataConnectionHelper.cs
- TypeUnloadedException.cs
- httpapplicationstate.cs
- DataSetMappper.cs
- HttpModulesSection.cs
- TraceSwitch.cs
- StateMachineWorkflowInstance.cs
- UTF7Encoding.cs
- ResourceReferenceKeyNotFoundException.cs
- ToolStripOverflowButton.cs
- ThumbButtonInfo.cs
- DataQuery.cs
- MessageFault.cs
- AuthenticationConfig.cs
- StoreItemCollection.cs
- XmlSchemaImport.cs
- EmbeddedObject.cs
- EventBookmark.cs
- BrushValueSerializer.cs
- SQLBinaryStorage.cs
- PropertyCondition.cs
- Point3DCollection.cs
- PageRequestManager.cs
- XmlRootAttribute.cs
- ContentPropertyAttribute.cs
- AppDomain.cs
- HTTPNotFoundHandler.cs
- FormClosingEvent.cs
- ValueQuery.cs
- BaseDataList.cs
- Expressions.cs
- SqlGatherProducedAliases.cs
- GridLength.cs
- ListView.cs
- ProxyHelper.cs
- MembershipPasswordException.cs
- MsdtcWrapper.cs
- SiteOfOriginPart.cs
- NGCUIElementCollectionSerializerAsync.cs
- Attributes.cs
- AudioBase.cs
- ApplicationSettingsBase.cs
- MetaModel.cs
- BinaryFormatterWriter.cs
- SqlDependencyListener.cs
- ScrollProviderWrapper.cs
- ComponentRenameEvent.cs
- ParameterElementCollection.cs
- DrawingContextDrawingContextWalker.cs
- RenderContext.cs
- GlyphCollection.cs
- TypeExtension.cs
- RegionIterator.cs
- Mutex.cs
- HtmlTextArea.cs
- WindowsStatic.cs
- PatternMatcher.cs
- SettingsSection.cs
- FormViewDeletedEventArgs.cs
- EmissiveMaterial.cs
- FunctionQuery.cs
- RemotingService.cs
- StringDictionaryWithComparer.cs
- RoutedEventArgs.cs
- SizeValueSerializer.cs
- QueryRewriter.cs
- Pen.cs
- ProfileParameter.cs
- PropertyPath.cs
- VectorValueSerializer.cs
- ToolboxItemCollection.cs
- StandardRuntimeEnumValidatorAttribute.cs
- GACIdentityPermission.cs
- BrushValueSerializer.cs
- LocationReferenceEnvironment.cs
- WindowsListViewItemStartMenu.cs
- InkSerializer.cs
- ConfigurationPropertyAttribute.cs
- DependencyObject.cs
- WebPartConnectionsDisconnectVerb.cs
- CopyCodeAction.cs
- UInt64Converter.cs
- DelayedRegex.cs
- DbConnectionInternal.cs
- ActivityInterfaces.cs
- DnsPermission.cs
- UniqueTransportManagerRegistration.cs
- CompoundFileReference.cs