System.Object

As we have already seen, every type in VB.NET, whether it is a value type or a reference type, ultimately inherits from the root class System.Object. 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
Overridable Overloads Public Function Equals( _
 ByVal obj As Object) As Boolean

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 ...

Get Application Development Using Visual Basic® and .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.