Lecture overview -- Keyboard shortcut: 'u'  Previous page: The top of the class hierarchy -- Keyboard shortcut: 'p'  Next page: Inheritance and Constructors -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 23 : 40
Object-oriented Programming in C#
Specialization, Extension, and Inheritance
Methods in the class Object in C#

The methods in class Object can be used uniformly on both values and objects in C#

  • Public methods in class Object

    • Equals:

      • obj1.Equals(obj2)    -    Instance method

      • Object.Equals(obj1, obj2)    -    Static method

      • Object.ReferenceEquals(obj1,obj2)    -    Static method

    • obj.GetHashCode()

    • obj.GetType()

    • obj.ToString()

  • Protected methods in class Object

    • obj.Finalize()

    • obj.MemberwiseClone()