Code:
/ FX-1434 / FX-1434 / 1.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
- Transactions.cs
- CachedFontFamily.cs
- RenderOptions.cs
- CommandTreeTypeHelper.cs
- SimpleFieldTemplateUserControl.cs
- WebHostScriptMappingsInstallComponent.cs
- DataGridViewRowPostPaintEventArgs.cs
- BooleanFacetDescriptionElement.cs
- BamlTreeUpdater.cs
- ECDiffieHellmanCngPublicKey.cs
- XamlFigureLengthSerializer.cs
- RemotingException.cs
- FileResponseElement.cs
- ChildrenQuery.cs
- ExpressionBuilderContext.cs
- OleDbErrorCollection.cs
- ByteAnimation.cs
- Restrictions.cs
- DecimalKeyFrameCollection.cs
- XmlSchemaParticle.cs
- RubberbandSelector.cs
- QualificationDataItem.cs
- DecoderFallback.cs
- NamespaceMapping.cs
- TextProviderWrapper.cs
- ListViewHitTestInfo.cs
- ViewUtilities.cs
- XmlUtf8RawTextWriter.cs
- FixedSOMTextRun.cs
- RootProfilePropertySettingsCollection.cs
- MenuEventArgs.cs
- UInt64Converter.cs
- SizeConverter.cs
- counter.cs
- ElementsClipboardData.cs
- EntityFrameworkVersions.cs
- SignatureToken.cs
- ColorConvertedBitmap.cs
- LabelDesigner.cs
- ProfileManager.cs
- InternalsVisibleToAttribute.cs
- PenLineCapValidation.cs
- ProfileProvider.cs
- WebHttpSecurityElement.cs
- DnsEndPoint.cs
- XmlAtomicValue.cs
- Label.cs
- ToolStripSplitButton.cs
- OracleException.cs
- WorkflowInstanceAbortedRecord.cs
- MemberBinding.cs
- MultipartIdentifier.cs
- PageStatePersister.cs
- PerformanceCounterPermissionEntry.cs
- DataGridViewAutoSizeModeEventArgs.cs
- DbProviderFactory.cs
- ComponentConverter.cs
- SafeViewOfFileHandle.cs
- odbcmetadatacolumnnames.cs
- UIElement3DAutomationPeer.cs
- TraceHandler.cs
- ImmutableObjectAttribute.cs
- tibetanshape.cs
- RegistryPermission.cs
- XPathNavigatorReader.cs
- SecurityManager.cs
- XmlQualifiedName.cs
- DbExpressionVisitor_TResultType.cs
- XmlEntity.cs
- ListBoxItem.cs
- DbReferenceCollection.cs
- AnnotationStore.cs
- DecoderBestFitFallback.cs
- EntityDataSourceChangedEventArgs.cs
- MenuItem.cs
- HMAC.cs
- DynamicExpression.cs
- TextServicesDisplayAttributePropertyRanges.cs
- UInt32Storage.cs
- StatusBarPanelClickEvent.cs
- XmlEntityReference.cs
- DesignerDataSourceView.cs
- ReferencedType.cs
- DispatcherHooks.cs
- ToolboxComponentsCreatingEventArgs.cs
- StretchValidation.cs
- BookmarkWorkItem.cs
- EntityDataSourceDesignerHelper.cs
- ThreadExceptionEvent.cs
- CodeAttributeArgument.cs
- AcceleratedTokenAuthenticator.cs
- CriticalFinalizerObject.cs
- WebAdminConfigurationHelper.cs
- CodeTypeReference.cs
- CompletedAsyncResult.cs
- ArgumentException.cs
- DesignerRegion.cs
- BindingManagerDataErrorEventArgs.cs
- NameSpaceExtractor.cs
- DebugViewWriter.cs