1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 /*============================================================ 6 ** 7 ** 8 ** 9 ** Purpose: Base class for all value classes. 10 ** 11 ** 12 ===========================================================*/ 13 14 using Internal.Runtime.Augments; 15 16 namespace System 17 { 18 // CONTRACT with Runtime 19 // Place holder type for type hierarchy, Compiler/Runtime requires this class 20 [Serializable] 21 [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] 22 public abstract class ValueType 23 { ToString()24 public override String ToString() 25 { 26 return this.GetType().ToString(); 27 } 28 Equals(object obj)29 public override bool Equals(object obj) 30 { 31 return RuntimeAugments.Callbacks.ValueTypeEqualsUsingReflection(this, obj); 32 } 33 GetHashCode()34 public override int GetHashCode() 35 { 36 return RuntimeAugments.Callbacks.ValueTypeGetHashCodeUsingReflection(this); 37 } 38 } 39 } 40