System.Object Class
Understand the foundational role of the System.Object class in C# and .NET. Learn how all types inherit its key methods, such as ToString, GetHashCode, GetType, and Equals, and discover how these virtual methods provide functionality and can be overridden to customize behavior.
We'll cover the following...
We'll cover the following...
Introduction
All types in .NET, including the ones we create ourselves, inherit from the System.Object class. Even if we don’t state that we want them to inherit from System.Object, our types inherit implicitly. The System.Object class is at the top of the inheritance hierarchy in .NET.
Note: The
objectis an alias forSystem.Object. ...