5 // Miguel de Icaza (miguel@ximian.com)
7 // (C) Ximian, Inc. http://www.ximian.com
11 using System.Runtime.CompilerServices;
18 // Compares this object to the specified object.
19 // Returns true if they are equal, false otherwise.
21 public virtual bool Equals (object o)
27 // Compares two objects for equality
29 public static bool Equals (object a, object b)
34 if (a == null || b == null)
41 // Initializes a new instance of the object class.
55 // Returns a hashcode for this object. Each derived
56 // class should return a hash code that makes sense
57 // for that particular implementation of the object.
59 [MethodImplAttribute(MethodImplOptions.InternalCall)]
60 public extern virtual int GetHashCode ();
63 // Returns the Type associated with the object.
65 [MethodImplAttribute(MethodImplOptions.InternalCall)]
66 public extern Type GetType ();
69 // Shallow copy of the object.
71 [MethodImplAttribute(MethodImplOptions.InternalCall)]
72 protected extern object MemberwiseClone ();
75 // Returns a stringified representation of the object.
76 // This is not supposed to be used for user presentation,
77 // use Format() for that and IFormattable.
79 // ToString is mostly used for debugging purposes.
81 public virtual string ToString ()
83 return GetType().FullName;
87 // Tests whether a is equal to b.
88 // Can not figure out why this even exists
90 public static bool ReferenceEquals (object a, object b)
95 [MethodImplAttribute(MethodImplOptions.InternalCall)]
96 internal extern IntPtr obj_address ();
98 void FieldGetter (string typeName, string fieldName, ref object val)
103 void FieldSetter (string typeName, string fieldName, object val)