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
- XsdBuilder.cs
- ComboBoxItem.cs
- LocatorManager.cs
- ColorConvertedBitmap.cs
- InkCanvas.cs
- GPPOINT.cs
- GridViewUpdateEventArgs.cs
- JsonServiceDocumentSerializer.cs
- MaskedTextBox.cs
- Matrix.cs
- TabControlCancelEvent.cs
- XPathSelfQuery.cs
- RangeBase.cs
- Pens.cs
- TableAutomationPeer.cs
- XmlSchemaGroupRef.cs
- RequiredFieldValidator.cs
- PanelStyle.cs
- DbQueryCommandTree.cs
- BooleanProjectedSlot.cs
- xmlfixedPageInfo.cs
- ArcSegment.cs
- SchemaManager.cs
- Renderer.cs
- ReadOnlyTernaryTree.cs
- CaseExpr.cs
- ToolStripItemTextRenderEventArgs.cs
- ColorContextHelper.cs
- Matrix3D.cs
- MissingFieldException.cs
- ScrollViewerAutomationPeer.cs
- WebBrowserPermission.cs
- SessionStateModule.cs
- NamespaceExpr.cs
- ControlParser.cs
- ChtmlCommandAdapter.cs
- HttpValueCollection.cs
- Rule.cs
- MatrixAnimationUsingKeyFrames.cs
- RoleManagerSection.cs
- Closure.cs
- DataViewSetting.cs
- XmlWrappingReader.cs
- DESCryptoServiceProvider.cs
- InstanceCompleteException.cs
- DataColumnPropertyDescriptor.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- QueryValue.cs
- MappingSource.cs
- CreateUserWizardStep.cs
- MimeParameter.cs
- StreamWithDictionary.cs
- RadioButton.cs
- GestureRecognitionResult.cs
- Parsers.cs
- WindowsListViewItem.cs
- BreakRecordTable.cs
- XLinq.cs
- SessionStateItemCollection.cs
- xmlformatgeneratorstatics.cs
- EntityCollection.cs
- LinkButton.cs
- QueryResult.cs
- VerificationAttribute.cs
- Border.cs
- ByValueEqualityComparer.cs
- SystemPens.cs
- ProfileGroupSettings.cs
- EntityDataSourceState.cs
- Header.cs
- RestHandlerFactory.cs
- SqlParameterizer.cs
- updatecommandorderer.cs
- SqlComparer.cs
- TypeExtension.cs
- HyperlinkAutomationPeer.cs
- PropertyChangedEventArgs.cs
- ToolStripPanelRow.cs
- TimeStampChecker.cs
- XmlNodeChangedEventArgs.cs
- AmbientValueAttribute.cs
- SqlLiftWhereClauses.cs
- PrintDocument.cs
- Image.cs
- ColorTranslator.cs
- RegionInfo.cs
- ClosableStream.cs
- HostingEnvironmentWrapper.cs
- DiscoveryMessageProperty.cs
- StringTraceRecord.cs
- ByteStack.cs
- MonthCalendar.cs
- DocumentViewerHelper.cs
- AssemblyInfo.cs
- QfeChecker.cs
- ConfigurationValidatorBase.cs
- TypefaceCollection.cs
- LoadMessageLogger.cs
- MessageDirection.cs
- ColorPalette.cs