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
- BuildProvider.cs
- Image.cs
- SymLanguageType.cs
- CapabilitiesRule.cs
- WindowsFormsHelpers.cs
- SqlProvider.cs
- DataGridComboBoxColumn.cs
- SymbolMethod.cs
- PropertyEmitter.cs
- TextElementAutomationPeer.cs
- DesignTimeVisibleAttribute.cs
- FigureHelper.cs
- SmtpDigestAuthenticationModule.cs
- GeneralTransform3D.cs
- JavaScriptSerializer.cs
- JpegBitmapEncoder.cs
- XPathScanner.cs
- CodeDomDecompiler.cs
- MsmqIntegrationElement.cs
- SimpleRecyclingCache.cs
- AnnotationAuthorChangedEventArgs.cs
- RuntimeConfig.cs
- AudienceUriMode.cs
- SelectionProcessor.cs
- CodeTypeDeclaration.cs
- CancellationToken.cs
- WorkflowHostingEndpoint.cs
- SqlBooleanMismatchVisitor.cs
- RenderCapability.cs
- CircleHotSpot.cs
- BaseParaClient.cs
- KnownBoxes.cs
- TreeNodeConverter.cs
- XmlSchemaSimpleTypeUnion.cs
- SoapCodeExporter.cs
- LocatorBase.cs
- DataFormat.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- TagMapCollection.cs
- ParagraphVisual.cs
- Tokenizer.cs
- XmlCustomFormatter.cs
- SchemaNamespaceManager.cs
- TransactionFlowElement.cs
- TreeView.cs
- NavigationProperty.cs
- BlockUIContainer.cs
- ObjectTypeMapping.cs
- XmlSchemaAttributeGroup.cs
- AssemblyBuilderData.cs
- ProviderUtil.cs
- AssemblyName.cs
- XpsResourcePolicy.cs
- Type.cs
- AVElementHelper.cs
- CalculatedColumn.cs
- SubpageParaClient.cs
- Timer.cs
- PropertyCondition.cs
- TemplateComponentConnector.cs
- StaticTextPointer.cs
- XmlWrappingReader.cs
- FunctionParameter.cs
- Transaction.cs
- MarkupWriter.cs
- XPathItem.cs
- DesignerLinkAdapter.cs
- TemplateLookupAction.cs
- FormsAuthenticationTicket.cs
- ToolBarButton.cs
- TextEffectResolver.cs
- RuntimeConfig.cs
- ListViewGroupItemCollection.cs
- ImageClickEventArgs.cs
- VisualTarget.cs
- DbRetry.cs
- SecUtil.cs
- XPathScanner.cs
- CompensatableTransactionScopeActivityDesigner.cs
- EventLogRecord.cs
- NotImplementedException.cs
- ConfigurationSectionCollection.cs
- TextTabProperties.cs
- RemotingConfigParser.cs
- UndirectedGraph.cs
- InheritanceContextChangedEventManager.cs
- EndpointAddress.cs
- Page.cs
- ItemChangedEventArgs.cs
- CollectionsUtil.cs
- IpcPort.cs
- Compress.cs
- ConfigsHelper.cs
- CompressedStack.cs
- RelationshipEndMember.cs
- FileUtil.cs
- ToolBarButton.cs
- ContactManager.cs
- Substitution.cs
- StandardToolWindows.cs