System.Object is a top of the class hierarchy and is only class which is not inherited for another type whereas all types in .NET inherit from another type.
Here in this tutorial I am providing you the .net data type class hierarchy:
Points to note:
1. System.Object is the base to each type, which defines a set of methods
(e.g., ToString(), Equals(), GetHashCode()) common to all types in the .NET base class libraries.
2. Also note that many numerical data types derive from a class named System.ValueType. Descendants
of ValueType are automatically allocated on the stack and, therefore, have a predictable lifetime and are
quite efficient.
3. Types that do not have System.ValueType in their inheritance chain
(such as System.Type, System.String, System.Array, System.Exception, and System.Delegate) are not allocated on the stack but on the garbage-collected heap.
0 Comment(s)