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
- TextOutput.cs
- CodeAssignStatement.cs
- WindowsSpinner.cs
- StateMachine.cs
- WorkflowRuntime.cs
- AtomMaterializerLog.cs
- SymLanguageVendor.cs
- XsltFunctions.cs
- EntityDataReader.cs
- PersianCalendar.cs
- AbandonedMutexException.cs
- BidOverLoads.cs
- MsmqUri.cs
- LOSFormatter.cs
- GcSettings.cs
- HMACSHA512.cs
- ThreadExceptionEvent.cs
- LambdaCompiler.Unary.cs
- TableProviderWrapper.cs
- WebPartCloseVerb.cs
- categoryentry.cs
- TreeNodeConverter.cs
- DirectoryObjectSecurity.cs
- RtfToken.cs
- Model3D.cs
- FormsAuthenticationUserCollection.cs
- ContextMenu.cs
- TypeListConverter.cs
- CustomCredentialPolicy.cs
- DecoderExceptionFallback.cs
- TextTreeRootNode.cs
- NaturalLanguageHyphenator.cs
- MSHTMLHost.cs
- XPathDocumentIterator.cs
- SiteMapSection.cs
- Visual.cs
- CodeCompileUnit.cs
- ListChunk.cs
- SafeHandles.cs
- Lasso.cs
- ActionFrame.cs
- AsyncWaitHandle.cs
- ClientSettingsSection.cs
- MarshalDirectiveException.cs
- GuidelineSet.cs
- mediaeventargs.cs
- BrowserTree.cs
- DataSet.cs
- TimeSpanValidatorAttribute.cs
- XPathExpr.cs
- UpdateProgress.cs
- AvTraceFormat.cs
- LocalBuilder.cs
- TypeValidationEventArgs.cs
- EntityContainerAssociationSetEnd.cs
- ValidationError.cs
- CommandPlan.cs
- OleDbCommand.cs
- METAHEADER.cs
- CryptoApi.cs
- EntityProviderFactory.cs
- TrimSurroundingWhitespaceAttribute.cs
- FtpRequestCacheValidator.cs
- ApplicationSecurityManager.cs
- CounterSet.cs
- IDispatchConstantAttribute.cs
- HandlerBase.cs
- XamlStackWriter.cs
- EntityKey.cs
- LogicalChannel.cs
- ChannelBinding.cs
- EmptyQuery.cs
- PropertyConverter.cs
- PrivilegeNotHeldException.cs
- DrawListViewItemEventArgs.cs
- TextFormatter.cs
- Comparer.cs
- TextSyndicationContent.cs
- WebPartCatalogCloseVerb.cs
- Currency.cs
- TextContainerChangedEventArgs.cs
- ObjectContextServiceProvider.cs
- Figure.cs
- LassoSelectionBehavior.cs
- TrackBarRenderer.cs
- AuthenticationService.cs
- WMIInterop.cs
- CharUnicodeInfo.cs
- ALinqExpressionVisitor.cs
- XmlSchemaSimpleTypeList.cs
- NullableDoubleAverageAggregationOperator.cs
- IdentitySection.cs
- XmlAggregates.cs
- Accessible.cs
- DeliveryRequirementsAttribute.cs
- SchemaElementDecl.cs
- MembershipValidatePasswordEventArgs.cs
- TriggerAction.cs
- PrintingPermissionAttribute.cs
- AgileSafeNativeMemoryHandle.cs