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
- ObjectSet.cs
- ComboBox.cs
- Utils.cs
- CoTaskMemHandle.cs
- RangeContentEnumerator.cs
- entityreference_tresulttype.cs
- NetTcpSectionData.cs
- StrokeCollectionConverter.cs
- PriorityQueue.cs
- BufferedGraphicsContext.cs
- PopOutPanel.cs
- DataGridViewUtilities.cs
- ObjectReaderCompiler.cs
- TranslateTransform.cs
- PeerNameRegistration.cs
- EnumValAlphaComparer.cs
- DbProviderServices.cs
- SamlAction.cs
- TextTreeTextElementNode.cs
- WindowsStreamSecurityElement.cs
- SimpleApplicationHost.cs
- HandleScope.cs
- XsltException.cs
- mansign.cs
- UndirectedGraph.cs
- FormClosedEvent.cs
- Socket.cs
- ImageSource.cs
- WebPartVerbsEventArgs.cs
- TrackBarRenderer.cs
- RegularExpressionValidator.cs
- CheckBoxFlatAdapter.cs
- InvalidOleVariantTypeException.cs
- TemplateControlCodeDomTreeGenerator.cs
- InstanceKeyCollisionException.cs
- KeyMatchBuilder.cs
- StreamResourceInfo.cs
- KeyedPriorityQueue.cs
- ScrollableControl.cs
- AlternationConverter.cs
- DataGridViewCellEventArgs.cs
- PolicyStatement.cs
- MenuItem.cs
- AnnotationObservableCollection.cs
- AssemblyResourceLoader.cs
- EntitySqlQueryBuilder.cs
- ComponentChangingEvent.cs
- SessionSwitchEventArgs.cs
- ConfigurationManager.cs
- InvalidWMPVersionException.cs
- HierarchicalDataBoundControl.cs
- CommandBinding.cs
- DivideByZeroException.cs
- DataGridCellEditEndingEventArgs.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- errorpatternmatcher.cs
- DecoderExceptionFallback.cs
- WebException.cs
- DesignerVerb.cs
- OptimalBreakSession.cs
- DataColumnPropertyDescriptor.cs
- InkCanvas.cs
- DeflateEmulationStream.cs
- AlternationConverter.cs
- OdbcConnectionOpen.cs
- TranslateTransform.cs
- WindowHideOrCloseTracker.cs
- SecurityTokenContainer.cs
- XmlArrayItemAttributes.cs
- TemplateBindingExpression.cs
- DomNameTable.cs
- XmlSchemaSimpleTypeRestriction.cs
- SaveFileDialog.cs
- UnsafeNativeMethods.cs
- SoapExtensionTypeElement.cs
- PrimitiveList.cs
- AttributeUsageAttribute.cs
- TableRowGroupCollection.cs
- DoneReceivingAsyncResult.cs
- TiffBitmapEncoder.cs
- SchemaAttDef.cs
- PermissionRequestEvidence.cs
- ComAwareEventInfo.cs
- ToolBarTray.cs
- StateDesigner.Layouts.cs
- ObjectDataSourceStatusEventArgs.cs
- InkPresenter.cs
- TextHidden.cs
- PeerName.cs
- DBConnection.cs
- TargetConverter.cs
- MouseOverProperty.cs
- Serializer.cs
- DataGridViewMethods.cs
- PageTheme.cs
- TouchFrameEventArgs.cs
- TouchFrameEventArgs.cs
- EdmConstants.cs
- XmlSchemaFacet.cs
- RoleManagerSection.cs