System.Object

As mentioned in Chapter 10, every class in .NET is ultimately derived from the root class Object, which is in the System namespace. The class ValueType inherits directly from Object. ValueType is the root for all value types, such as structures and simple types like Integer and Decimal.

Public Instance Methods of Object

There are four public instance methods of Object, three of which are virtual and frequently overridden by classes.

EQUALS
public virtual bool Equals(Object obj);

This method compares an object with the object passed as a parameter and returns true if they are equal. Object implements this method to test for reference equality. ValueType overrides the method to test for content equality. Many classes override the ...

Get Programming PERL in the .NET Environment 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.