September 2002
Intermediate to advanced
496 pages
10h
English
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.
There are four public instance methods of Object, three of which are virtual and frequently overridden by classes.
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 ...
Read now
Unlock full access