Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / clr / src / BCL / System / ValueType.cs / 2 / 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
- StopStoryboard.cs
- EditorAttribute.cs
- ProgressPage.cs
- MoveSizeWinEventHandler.cs
- ScriptControlManager.cs
- _TransmitFileOverlappedAsyncResult.cs
- ViewEventArgs.cs
- BooleanAnimationUsingKeyFrames.cs
- PersistenceTypeAttribute.cs
- RelatedCurrencyManager.cs
- ObjectListCommandEventArgs.cs
- EdmToObjectNamespaceMap.cs
- ProjectedSlot.cs
- MultiTargetingUtil.cs
- StaticTextPointer.cs
- TableLayoutPanel.cs
- GiveFeedbackEvent.cs
- TextRangeBase.cs
- PlanCompilerUtil.cs
- ParameterCollection.cs
- PageStatePersister.cs
- IgnoreFileBuildProvider.cs
- SynchronizationScope.cs
- DeriveBytes.cs
- smtpconnection.cs
- DataGridViewColumnTypePicker.cs
- CompModSwitches.cs
- ConfigurationException.cs
- BigIntegerStorage.cs
- WaitForChangedResult.cs
- HttpResponseHeader.cs
- IPEndPointCollection.cs
- BaseWebProxyFinder.cs
- FunctionQuery.cs
- SecurityUtils.cs
- SparseMemoryStream.cs
- CatchBlock.cs
- LoginUtil.cs
- FtpRequestCacheValidator.cs
- HttpWebResponse.cs
- ArcSegment.cs
- MostlySingletonList.cs
- StateInitializationDesigner.cs
- CopyNodeSetAction.cs
- UriExt.cs
- httpapplicationstate.cs
- GenericPrincipal.cs
- FontWeightConverter.cs
- SessionState.cs
- DecimalConverter.cs
- TextLineResult.cs
- WindowsHyperlink.cs
- ProfileService.cs
- ObjectDataSourceFilteringEventArgs.cs
- Attributes.cs
- BinaryFormatter.cs
- SymLanguageType.cs
- FormatterConverter.cs
- PathStreamGeometryContext.cs
- XsdDataContractExporter.cs
- ComponentTray.cs
- FactoryMaker.cs
- EntityDescriptor.cs
- translator.cs
- ButtonFieldBase.cs
- PreDigestedSignedInfo.cs
- SizeAnimation.cs
- Utils.cs
- WsiProfilesElement.cs
- StdRegProviderWrapper.cs
- FileEnumerator.cs
- OdbcConnection.cs
- IdentityHolder.cs
- WindowsMenu.cs
- SoapSchemaImporter.cs
- InternalConfigEventArgs.cs
- KoreanCalendar.cs
- TypeElement.cs
- Renderer.cs
- cryptoapiTransform.cs
- x509utils.cs
- BindingList.cs
- PreservationFileWriter.cs
- VirtualDirectoryMappingCollection.cs
- RootProfilePropertySettingsCollection.cs
- SafeNativeMemoryHandle.cs
- FileUtil.cs
- LayoutInformation.cs
- RuleConditionDialog.Designer.cs
- ComplexObject.cs
- ContentIterators.cs
- XsltOutput.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- RuntimeEnvironment.cs
- AsnEncodedData.cs
- SoapServerMessage.cs
- CodeTypeReference.cs
- ListViewHitTestInfo.cs
- ScriptResourceAttribute.cs
- DataGridRowsPresenter.cs