Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ToolboxItemFilterAttribute.cs
- Permission.cs
- CalendarDateRangeChangingEventArgs.cs
- EventInfo.cs
- EncodingDataItem.cs
- safemediahandle.cs
- MsmqInputChannelBase.cs
- DropAnimation.xaml.cs
- CodeExpressionRuleDeclaration.cs
- SimpleMailWebEventProvider.cs
- XmlSchemaAnnotation.cs
- WebPartAddingEventArgs.cs
- BufferedWebEventProvider.cs
- QilDataSource.cs
- PublishLicense.cs
- GenericWebPart.cs
- Menu.cs
- XamlSerializerUtil.cs
- RC2CryptoServiceProvider.cs
- WindowCollection.cs
- Int32EqualityComparer.cs
- DataDesignUtil.cs
- PixelFormat.cs
- ProfileParameter.cs
- CodeObjectCreateExpression.cs
- ToolStripDropDownButton.cs
- NoneExcludedImageIndexConverter.cs
- GridView.cs
- ChtmlFormAdapter.cs
- OleTxTransactionInfo.cs
- GenerateTemporaryTargetAssembly.cs
- Keyboard.cs
- NodeFunctions.cs
- DataSourceView.cs
- XamlReaderHelper.cs
- MenuScrollingVisibilityConverter.cs
- DynamicRenderer.cs
- Nodes.cs
- XPSSignatureDefinition.cs
- RowVisual.cs
- AssociativeAggregationOperator.cs
- DateTimeParse.cs
- ClipboardData.cs
- ContentElementCollection.cs
- FunctionMappingTranslator.cs
- ItemsChangedEventArgs.cs
- Context.cs
- InternalCache.cs
- ContentElement.cs
- PLINQETWProvider.cs
- Or.cs
- BuildManagerHost.cs
- BaseValidatorDesigner.cs
- AssemblyFilter.cs
- XslNumber.cs
- WmpBitmapDecoder.cs
- SqlProviderUtilities.cs
- ByeOperationAsyncResult.cs
- SystemSounds.cs
- SamlAttributeStatement.cs
- Pointer.cs
- MtomMessageEncodingElement.cs
- HttpListenerRequest.cs
- TransportDefaults.cs
- SessionIDManager.cs
- MenuCommand.cs
- PermissionToken.cs
- ProbeMatches11.cs
- WorkflowInvoker.cs
- WebBrowserProgressChangedEventHandler.cs
- DataGridComboBoxColumn.cs
- DeploymentSection.cs
- Int32CAMarshaler.cs
- UnknownWrapper.cs
- VolatileResourceManager.cs
- ApplicationInfo.cs
- Exceptions.cs
- FormViewInsertEventArgs.cs
- CuspData.cs
- ControlCollection.cs
- HtmlTableCell.cs
- SqlConnection.cs
- FacetDescription.cs
- CaseInsensitiveHashCodeProvider.cs
- TreeNodeCollection.cs
- DynamicQueryStringParameter.cs
- ErrorHandler.cs
- SqlStream.cs
- Soap12ProtocolReflector.cs
- SmiSettersStream.cs
- HiddenField.cs
- DefaultSection.cs
- WindowsSolidBrush.cs
- WebPartConnectionsConnectVerb.cs
- XmlReflectionImporter.cs
- mactripleDES.cs
- ColorMap.cs
- PagesChangedEventArgs.cs
- SyncOperationState.cs
- SizeLimitedCache.cs