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
- FileFormatException.cs
- HttpModuleAction.cs
- OdbcPermission.cs
- HttpCacheVaryByContentEncodings.cs
- SoapSchemaExporter.cs
- ListParaClient.cs
- SqlReferenceCollection.cs
- ObsoleteAttribute.cs
- ParameterBuilder.cs
- ValueType.cs
- PrintPreviewDialog.cs
- InternalConfigConfigurationFactory.cs
- StringReader.cs
- MetadataCache.cs
- KeyValueSerializer.cs
- ExpressionConverter.cs
- TraceLevelStore.cs
- ClientFormsAuthenticationMembershipProvider.cs
- CodeIdentifier.cs
- AndAlso.cs
- ScriptingScriptResourceHandlerSection.cs
- Point3DAnimation.cs
- PerformanceCounter.cs
- XmlReflectionImporter.cs
- GeneratedContractType.cs
- MetadataArtifactLoaderComposite.cs
- SafeRegistryKey.cs
- HashSet.cs
- PointLight.cs
- CngKeyCreationParameters.cs
- HtmlPanelAdapter.cs
- HebrewCalendar.cs
- CodeIterationStatement.cs
- DependencyPropertyChangedEventArgs.cs
- XmlDownloadManager.cs
- TraceSwitch.cs
- MouseButtonEventArgs.cs
- OpenTypeLayout.cs
- MatrixUtil.cs
- EntityDataSourceWizardForm.cs
- HttpModulesInstallComponent.cs
- PageWrapper.cs
- GenericTextProperties.cs
- WizardStepBase.cs
- BuilderInfo.cs
- OpCopier.cs
- State.cs
- ManagedWndProcTracker.cs
- TypeValidationEventArgs.cs
- PropertyNames.cs
- WCFBuildProvider.cs
- SqlExpressionNullability.cs
- MetaData.cs
- SolidColorBrush.cs
- KeySplineConverter.cs
- MobileSysDescriptionAttribute.cs
- TransformGroup.cs
- SqlFormatter.cs
- NodeLabelEditEvent.cs
- Stack.cs
- SupportsEventValidationAttribute.cs
- WsdlBuildProvider.cs
- DbConnectionPoolGroupProviderInfo.cs
- XmlDocumentFragment.cs
- ExpandedWrapper.cs
- ArgumentException.cs
- MDIWindowDialog.cs
- SizeAnimationBase.cs
- ContextDataSourceContextData.cs
- ConnectionsZone.cs
- NavigationProgressEventArgs.cs
- ColorContext.cs
- ReflectionPermission.cs
- DataGridViewRowCancelEventArgs.cs
- BevelBitmapEffect.cs
- Win32.cs
- IndentTextWriter.cs
- ListViewContainer.cs
- InternalConfigSettingsFactory.cs
- SecondaryIndexDefinition.cs
- Container.cs
- SyndicationSerializer.cs
- WebBrowsableAttribute.cs
- AlternationConverter.cs
- SecurityManager.cs
- ValueChangedEventManager.cs
- SqlBuffer.cs
- ProcessModule.cs
- QueueProcessor.cs
- MsmqIntegrationValidationBehavior.cs
- _AutoWebProxyScriptWrapper.cs
- OdbcException.cs
- Operand.cs
- MarginsConverter.cs
- FontDialog.cs
- SendActivity.cs
- TextViewBase.cs
- ConvertEvent.cs
- FileDialog.cs
- MergeFilterQuery.cs