Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DataSourceExpression.cs
- FormatterConverter.cs
- StringAnimationUsingKeyFrames.cs
- GiveFeedbackEvent.cs
- StickyNoteContentControl.cs
- ExecutionTracker.cs
- ObjectDataSourceChooseMethodsPanel.cs
- httpserverutility.cs
- DriveInfo.cs
- X509InitiatorCertificateClientElement.cs
- SortQuery.cs
- MeshGeometry3D.cs
- Models.cs
- StatusBar.cs
- BinaryNode.cs
- ToolStripComboBox.cs
- DataGridViewElement.cs
- AxHost.cs
- QilPatternFactory.cs
- SHA1.cs
- HandlerFactoryWrapper.cs
- xmlNames.cs
- WebBaseEventKeyComparer.cs
- TextWriter.cs
- EntityClassGenerator.cs
- LastQueryOperator.cs
- OdbcEnvironmentHandle.cs
- AccessedThroughPropertyAttribute.cs
- TogglePattern.cs
- Atom10ItemFormatter.cs
- DataGridViewColumnCollection.cs
- DelegateSerializationHolder.cs
- HttpModuleCollection.cs
- HtmlAnchor.cs
- InputLanguageProfileNotifySink.cs
- XmlAttributeCache.cs
- OdbcConnectionHandle.cs
- Funcletizer.cs
- SerializationBinder.cs
- ScrollChangedEventArgs.cs
- FormsIdentity.cs
- EventItfInfo.cs
- EntityProxyFactory.cs
- Literal.cs
- ModelPropertyDescriptor.cs
- JumpPath.cs
- FunctionDefinition.cs
- BamlBinaryReader.cs
- MenuEventArgs.cs
- ProfileGroupSettingsCollection.cs
- OleDbErrorCollection.cs
- Classification.cs
- PanelStyle.cs
- CLRBindingWorker.cs
- VisualStyleElement.cs
- XmlCharType.cs
- WebBaseEventKeyComparer.cs
- SmiContextFactory.cs
- SingleStorage.cs
- ObjectResult.cs
- HwndSubclass.cs
- Matrix3DConverter.cs
- RightsManagementPermission.cs
- Stacktrace.cs
- WsiProfilesElementCollection.cs
- ScriptIgnoreAttribute.cs
- ConstraintStruct.cs
- LoginUtil.cs
- PersonalizationProvider.cs
- RemotingException.cs
- PageThemeParser.cs
- AuthorizationRuleCollection.cs
- FormatterServices.cs
- SerializationException.cs
- LogSwitch.cs
- ExtentCqlBlock.cs
- SchemaElementDecl.cs
- DBConnection.cs
- SingleAnimationBase.cs
- XmlCharType.cs
- LOSFormatter.cs
- HtmlAnchor.cs
- CalendarItem.cs
- XmlNotation.cs
- DrawingAttributesDefaultValueFactory.cs
- ConfigurationValidatorBase.cs
- GcHandle.cs
- WindowsListViewItem.cs
- DrawingContext.cs
- SendDesigner.xaml.cs
- ToolZone.cs
- TextClipboardData.cs
- WindowsFormsHelpers.cs
- TCPListener.cs
- BitmapEffectCollection.cs
- SBCSCodePageEncoding.cs
- FtpCachePolicyElement.cs
- _ChunkParse.cs
- ListBindableAttribute.cs
- ExpressionBuilder.cs