Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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
- TextBoxRenderer.cs
- Comparer.cs
- SqlClientMetaDataCollectionNames.cs
- ScalarConstant.cs
- GetWorkflowTree.cs
- RenderData.cs
- Canonicalizers.cs
- ToolStripRenderEventArgs.cs
- WindowPattern.cs
- ViewKeyConstraint.cs
- PasswordDeriveBytes.cs
- FixedSOMContainer.cs
- NamespaceMapping.cs
- TransportReplyChannelAcceptor.cs
- AddIn.cs
- SessionStateUtil.cs
- CodeTypeOfExpression.cs
- ProfilePropertySettings.cs
- XamlWriter.cs
- DragEvent.cs
- GridEntryCollection.cs
- TemplateBindingExtension.cs
- MetricEntry.cs
- HybridDictionary.cs
- BaseCollection.cs
- BinHexEncoding.cs
- SqlDataSourceStatusEventArgs.cs
- Schema.cs
- ToolStripRendererSwitcher.cs
- Highlights.cs
- Effect.cs
- OdbcHandle.cs
- RoleService.cs
- ContextBase.cs
- InkCanvasSelection.cs
- IPEndPointCollection.cs
- X509DefaultServiceCertificateElement.cs
- TraceUtils.cs
- PagerSettings.cs
- Int16.cs
- PartialTrustVisibleAssemblyCollection.cs
- Selection.cs
- ToolStripOverflowButton.cs
- RSAProtectedConfigurationProvider.cs
- ThemeConfigurationDialog.cs
- StorageEntityContainerMapping.cs
- ElementMarkupObject.cs
- CLRBindingWorker.cs
- MimeFormReflector.cs
- DescendantOverDescendantQuery.cs
- DataSourceXmlAttributeAttribute.cs
- TrackingLocationCollection.cs
- XsdBuildProvider.cs
- GlyphInfoList.cs
- webproxy.cs
- XmlMembersMapping.cs
- ForwardPositionQuery.cs
- BamlResourceContent.cs
- QuaternionRotation3D.cs
- ScrollChrome.cs
- StringDictionaryCodeDomSerializer.cs
- ItemsPanelTemplate.cs
- CqlIdentifiers.cs
- List.cs
- ProjectionPlanCompiler.cs
- SecureUICommand.cs
- BitmapEncoder.cs
- FunctionImportMapping.cs
- Drawing.cs
- _SSPISessionCache.cs
- IndexOutOfRangeException.cs
- HierarchicalDataTemplate.cs
- DbCommandTree.cs
- DocumentPageHost.cs
- EntityDataSourceEntitySetNameItem.cs
- ChineseLunisolarCalendar.cs
- SqlComparer.cs
- Block.cs
- HwndAppCommandInputProvider.cs
- EmptyCollection.cs
- TrustSection.cs
- SerializationEventsCache.cs
- ParseHttpDate.cs
- LineBreakRecord.cs
- SerializeAbsoluteContext.cs
- PasswordDeriveBytes.cs
- ConcatQueryOperator.cs
- PropertyStore.cs
- HostProtectionPermission.cs
- BooleanProjectedSlot.cs
- DataListComponentEditor.cs
- HotSpotCollection.cs
- DeploymentExceptionMapper.cs
- CustomTypeDescriptor.cs
- NodeFunctions.cs
- StringSorter.cs
- LambdaCompiler.cs
- VerificationAttribute.cs
- XmlCodeExporter.cs
- GuidConverter.cs