3.3. Object class

The System.Object class serves as a base class for all of the classes in the Microsoft .NET Framework class library. Figure 3.3 shows the methods implemented in the Object class.

Figure 3.3. The methods implemented in the Object class

Here is a brief outline of these methods.

  • Equals(Object) or Equals(Object, Object) This method is used to test if an object is the same instance as another object. For value types, this method is overridden (in the ValueType class) to test for value identity. Note the difference – when we compare two reference types, this method checks if both instances refer to the same object instance; for ...

Get A Programmer's Guide to .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.