Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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
- _SslSessionsCache.cs
- TypeName.cs
- ItemCollection.cs
- RecordManager.cs
- Button.cs
- RuntimeWrappedException.cs
- ColorConverter.cs
- ErrorCodes.cs
- LinqDataSource.cs
- InstalledFontCollection.cs
- BuildProvider.cs
- InternalConfigRoot.cs
- WindowsIdentity.cs
- ScriptResourceInfo.cs
- XPathNodePointer.cs
- VisualCollection.cs
- SubclassTypeValidatorAttribute.cs
- FormViewPagerRow.cs
- RuntimeResourceSet.cs
- brushes.cs
- DoubleAnimationUsingPath.cs
- WebException.cs
- PersonalizationAdministration.cs
- WebPartHeaderCloseVerb.cs
- GroupLabel.cs
- TripleDESCryptoServiceProvider.cs
- ScriptReferenceBase.cs
- CodeNamespaceImport.cs
- SimpleTypeResolver.cs
- NonBatchDirectoryCompiler.cs
- SystemNetHelpers.cs
- DynamicDocumentPaginator.cs
- XmlUtf8RawTextWriter.cs
- FrameworkElement.cs
- ServiceDescriptionReflector.cs
- WindowsListView.cs
- XdrBuilder.cs
- lengthconverter.cs
- SqlMethodCallConverter.cs
- Script.cs
- GregorianCalendarHelper.cs
- FixedPageAutomationPeer.cs
- TextServicesHost.cs
- BaseCodePageEncoding.cs
- SelectionUIHandler.cs
- ParameterBuilder.cs
- ObjectStorage.cs
- Light.cs
- UnsafeNativeMethodsMilCoreApi.cs
- FixedDSBuilder.cs
- ChannelHandler.cs
- BulletedList.cs
- DataConnectionHelper.cs
- SHA384.cs
- StoryFragments.cs
- Thread.cs
- TimeSpan.cs
- UnsafeNativeMethodsTablet.cs
- GridViewColumn.cs
- XmlQualifiedNameTest.cs
- ObjectTag.cs
- ProfessionalColorTable.cs
- Accessible.cs
- FactoryId.cs
- SemaphoreSecurity.cs
- IItemProperties.cs
- InputMethodStateTypeInfo.cs
- SmiGettersStream.cs
- Select.cs
- DeploymentSectionCache.cs
- Visual3D.cs
- ListSourceHelper.cs
- Point3DKeyFrameCollection.cs
- ReflectionHelper.cs
- Label.cs
- CompilerTypeWithParams.cs
- KeyConverter.cs
- XmlDataImplementation.cs
- DebugController.cs
- TableLayoutPanelCellPosition.cs
- SmtpReplyReader.cs
- EndPoint.cs
- EndpointNameMessageFilter.cs
- DefaultPropertyAttribute.cs
- ParentControlDesigner.cs
- Bezier.cs
- MessageTraceRecord.cs
- TemplateControlParser.cs
- FrameworkElementAutomationPeer.cs
- FastEncoder.cs
- dataobject.cs
- UnsafeNativeMethods.cs
- XmlCDATASection.cs
- ConversionHelper.cs
- FormatConvertedBitmap.cs
- ExpressionVisitor.cs
- SourceFileBuildProvider.cs
- LinkGrep.cs
- RestHandler.cs
- ProtocolsConfigurationEntry.cs