CLR requires that each type be ultimately derived from the object type, as follows:
Class Typer {}=== class Typer: object {}
The above is completely equal.
All types are ultimately derived from objects. Each type has a set of basic methods:
Equals: returns True if two objects are equal.
GetHashCode: returns a hash code of the object value.
ToString: The full name of the returned type by default, and the int type is overwritten.
GetType: return the type of the called object.
In addition, the method that can access the protected type derived from the object
MemberWiseClone: returns a new real class.
Finalize: Virtual method called before memory reclaim
CLR requires that all objects be created using the NEW operator:
1. Calculation type and all base types, and some additional members
2. Allocate bytes of the specified type from the heap
3. Call an instance constructor to pass in any real parameters specified in the New call,
When calling each Type constructor, it is responsible for initializing the instance field of this type definition and finally calling the object constructor.
After new is executed, a reference of the new object is returned.