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
- iisPickupDirectory.cs
- XamlDebuggerXmlReader.cs
- WindowsClaimSet.cs
- LoginName.cs
- OracleInfoMessageEventArgs.cs
- Tablet.cs
- TransformedBitmap.cs
- MimeFormImporter.cs
- LassoSelectionBehavior.cs
- AuthenticateEventArgs.cs
- TextAction.cs
- DecimalKeyFrameCollection.cs
- RotateTransform.cs
- EventRoute.cs
- MenuItemStyle.cs
- SelectionUIService.cs
- Item.cs
- WinInet.cs
- DocumentViewerAutomationPeer.cs
- GatewayDefinition.cs
- Label.cs
- ScriptingJsonSerializationSection.cs
- VirtualPathUtility.cs
- BindableAttribute.cs
- SmtpNtlmAuthenticationModule.cs
- Switch.cs
- XmlNode.cs
- BaseProcessor.cs
- NavigationFailedEventArgs.cs
- BackgroundWorker.cs
- SessionPageStateSection.cs
- IntSecurity.cs
- RegexCompiler.cs
- EndSelectCardRequest.cs
- XmlDigitalSignatureProcessor.cs
- CounterNameConverter.cs
- DBSqlParserTable.cs
- iisPickupDirectory.cs
- ExpressionNormalizer.cs
- ListViewItemMouseHoverEvent.cs
- RNGCryptoServiceProvider.cs
- TraversalRequest.cs
- List.cs
- CompilationUtil.cs
- DataObject.cs
- HtmlInputHidden.cs
- DictionarySectionHandler.cs
- PenContext.cs
- TableLayoutSettings.cs
- HttpCapabilitiesBase.cs
- Effect.cs
- WSFederationHttpSecurityMode.cs
- PerformanceCounterLib.cs
- QilPatternFactory.cs
- SR.cs
- SystemResourceKey.cs
- RoleManagerModule.cs
- CounterCreationData.cs
- SafeNativeMethods.cs
- ContentPathSegment.cs
- Point3DCollectionConverter.cs
- Token.cs
- RoleGroup.cs
- SingleTagSectionHandler.cs
- DataTemplateSelector.cs
- Monitor.cs
- SqlCrossApplyToCrossJoin.cs
- StringAnimationUsingKeyFrames.cs
- NameObjectCollectionBase.cs
- ParentUndoUnit.cs
- SR.cs
- RotateTransform.cs
- Size.cs
- IPHostEntry.cs
- SharedDp.cs
- ComponentSerializationService.cs
- HttpBrowserCapabilitiesBase.cs
- ObjectRef.cs
- EdmItemError.cs
- XmlProcessingInstruction.cs
- PointCollection.cs
- TimeIntervalCollection.cs
- DynamicActivity.cs
- UIElementAutomationPeer.cs
- RunClient.cs
- XmlFormatExtensionPrefixAttribute.cs
- CalendarDesigner.cs
- PageAsyncTaskManager.cs
- OdbcHandle.cs
- StringExpressionSet.cs
- AutomationPropertyChangedEventArgs.cs
- Misc.cs
- EntityViewGenerationAttribute.cs
- ExpandableObjectConverter.cs
- CompoundFileIOPermission.cs
- ServicesUtilities.cs
- AsymmetricSecurityProtocol.cs
- ExceptionUtility.cs
- TextBoxAutomationPeer.cs
- FontInfo.cs