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
- TypeContext.cs
- HtmlTextArea.cs
- SqlCacheDependencyDatabaseCollection.cs
- Margins.cs
- NamespaceCollection.cs
- MimePart.cs
- StringWriter.cs
- GenericEnumerator.cs
- ProtocolsSection.cs
- Opcode.cs
- Bezier.cs
- CustomAttribute.cs
- _NegoState.cs
- ScrollPattern.cs
- ContentPlaceHolder.cs
- ClientOperationFormatterProvider.cs
- ThreadStaticAttribute.cs
- VisualBasicSettingsConverter.cs
- SrgsGrammarCompiler.cs
- LayoutManager.cs
- NegotiateStream.cs
- TextFormatterContext.cs
- PassportPrincipal.cs
- X509Utils.cs
- ItemMap.cs
- SrgsSubset.cs
- HttpApplication.cs
- ValidationErrorEventArgs.cs
- Overlapped.cs
- embossbitmapeffect.cs
- SocketStream.cs
- EdmValidator.cs
- WebPartTransformerAttribute.cs
- KeyConstraint.cs
- DragStartedEventArgs.cs
- PropertyRecord.cs
- ServiceDocument.cs
- VideoDrawing.cs
- SignatureDescription.cs
- SystemIcmpV6Statistics.cs
- SecondaryViewProvider.cs
- MsdtcClusterUtils.cs
- Merger.cs
- BlockExpression.cs
- MatrixTransform3D.cs
- XmlSchemaProviderAttribute.cs
- GridViewDeleteEventArgs.cs
- cookiecontainer.cs
- ScriptDescriptor.cs
- coordinatorscratchpad.cs
- DelegatingHeader.cs
- WebPartHelpVerb.cs
- DirectionalLight.cs
- TypeSemantics.cs
- SRDisplayNameAttribute.cs
- BlurBitmapEffect.cs
- UpWmlMobileTextWriter.cs
- EmbeddedMailObjectsCollection.cs
- FixedSOMElement.cs
- ScriptResourceInfo.cs
- TypeSystem.cs
- PrintEvent.cs
- ImpersonationContext.cs
- DataTableClearEvent.cs
- GenericWebPart.cs
- Timer.cs
- GridViewColumnHeader.cs
- PolicyImporterElement.cs
- Transform3D.cs
- PartBasedPackageProperties.cs
- TrackingParticipant.cs
- WhileDesigner.cs
- cookiecontainer.cs
- SubqueryRules.cs
- XXXOnTypeBuilderInstantiation.cs
- WindowsListViewScroll.cs
- LogStream.cs
- XmlArrayItemAttributes.cs
- UIElement.cs
- GPStream.cs
- SchemaAttDef.cs
- Point3DConverter.cs
- XmlBoundElement.cs
- ToolStripItemTextRenderEventArgs.cs
- ObjectTypeMapping.cs
- SoapSchemaExporter.cs
- CriticalExceptions.cs
- BitmapEffect.cs
- XmlComment.cs
- ArgumentException.cs
- DbConnectionPoolGroup.cs
- DesignerAttribute.cs
- DispatcherExceptionFilterEventArgs.cs
- MaskedTextBox.cs
- MimeMapping.cs
- TypeConverterHelper.cs
- StylusTip.cs
- AudioSignalProblemOccurredEventArgs.cs
- ObjectView.cs
- AttachedPropertyBrowsableAttribute.cs