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
- XXXOnTypeBuilderInstantiation.cs
- Pen.cs
- SortAction.cs
- OperationAbortedException.cs
- CompositeFontFamily.cs
- ExpressionTextBoxAutomationPeer.cs
- AppliedDeviceFiltersDialog.cs
- SafeHandle.cs
- HideDisabledControlAdapter.cs
- ObjectSet.cs
- MatcherBuilder.cs
- DefaultPrintController.cs
- CompiledXpathExpr.cs
- AmbientValueAttribute.cs
- UIAgentInitializationException.cs
- QuaternionValueSerializer.cs
- IndentedTextWriter.cs
- TextRunTypographyProperties.cs
- RenderTargetBitmap.cs
- KeyValueConfigurationElement.cs
- XhtmlStyleClass.cs
- HtmlGenericControl.cs
- WebPartMovingEventArgs.cs
- VisualStyleElement.cs
- VirtualPathUtility.cs
- XmlDomTextWriter.cs
- RowUpdatedEventArgs.cs
- cache.cs
- QilList.cs
- RelationshipType.cs
- ResourceReferenceExpression.cs
- XmlSignificantWhitespace.cs
- PermissionAttributes.cs
- DataGridViewMethods.cs
- BinaryObjectInfo.cs
- FileEnumerator.cs
- CapabilitiesRule.cs
- WorkflowInstanceSuspendedRecord.cs
- DataGridViewSelectedRowCollection.cs
- SmiContextFactory.cs
- ToolStripItemRenderEventArgs.cs
- NamespaceInfo.cs
- CodeDOMProvider.cs
- MetafileHeader.cs
- DefaultAssemblyResolver.cs
- EntityDesignerUtils.cs
- ReadOnlyHierarchicalDataSource.cs
- TextParagraph.cs
- SymbolType.cs
- PhysicalFontFamily.cs
- WebExceptionStatus.cs
- PeerResolverSettings.cs
- ListGeneralPage.cs
- MessageQueue.cs
- StateManagedCollection.cs
- DesignerWidgets.cs
- DocumentAutomationPeer.cs
- LogPolicy.cs
- ThemeableAttribute.cs
- ChildDocumentBlock.cs
- IntMinMaxAggregationOperator.cs
- Scene3D.cs
- ChannelManager.cs
- ReferenceTypeElement.cs
- Container.cs
- XmlLanguageConverter.cs
- MailWebEventProvider.cs
- Timer.cs
- TreeWalker.cs
- ActiveXContainer.cs
- DefaultCommandExtensionCallback.cs
- DataGridViewBindingCompleteEventArgs.cs
- BitmapCodecInfo.cs
- TypeLoadException.cs
- DbCommandTree.cs
- OraclePermission.cs
- EventBuilder.cs
- GradientStop.cs
- DataGridViewAccessibleObject.cs
- EventItfInfo.cs
- StringFunctions.cs
- ContextQuery.cs
- QueryStringConverter.cs
- ActivityScheduledQuery.cs
- Image.cs
- InputProviderSite.cs
- HTTPNotFoundHandler.cs
- FormViewDeletedEventArgs.cs
- TabItemAutomationPeer.cs
- CreateUserErrorEventArgs.cs
- XmlSchemaAttributeGroup.cs
- ToolStripContentPanel.cs
- Identifier.cs
- Exception.cs
- UriTemplateMatchException.cs
- Component.cs
- ComplexLine.cs
- XPSSignatureDefinition.cs
- SimpleRecyclingCache.cs
- DataTableReaderListener.cs