System.Object Class
Namespace: System
Supports all classes that are the base of the .NET Framework class hierarchy.
Syntax
public class Object
Remarks
The Object class is the ultimate base class of all types in the .NET Framework.
It is the root of the type hierarchy. All types derive, directly or indirectly, from Object.
Every type in .NET, whether it is a value type or a reference type, inherits members from the Object class.
This class includes instance methods that are common to all objects, such as Equals,
GetHashCode, ToString, and GetType.
The Object class is fundamental to how types are handled in .NET. It provides a common interface
for all objects, enabling polymorphism and enabling generic programming constructs.
Members
Constructors
| Name | Description |
|---|---|
| Object() | Initializes a new instance of the Object class. |
Methods
| Name | Description |
|---|---|
| Equals(Object obj) Equals(Object objA, Object objB) | Determines whether the specified object instances are equal. Overload implementations are used to determine equality. |
| GetHashCode() | Serves as the default hash function. Overload implementations are used to determine the hash code for the current object. |
| GetType() | Gets the runtime type of the current instance. |
| MemberwiseClone() | Creates a shallow copy of the current Object. |
| ReferenceEquals(Object objA, Object objB) | Determines whether the specified Object instances are the same instance. |
| ToString() | Returns a String that represents the current object. |
Fields
This class has no fields.