CLR Object-Method-Type Relationship
Object
Object is the building block in the managed world.
Debugging Commands: !DumpObj, !DumpStackObjects, !DumpArray
Type
A type describes fields and properties that hold data, as well as methods and events that describe its behavior. The information stored in a type can include the following:
- The storage space that a variable of the type requires.
- The maximum and minimum values that it can represent.
- The members (methods, fields, events, and so on) that it contains.
- The base type it inherits from.
- The location where the memory for variables will be allocated at run time.
- The kinds of operations that are permitted.
EEClass
EEClass is the data structure used by CLR to store all information about a Type.
MethodTable
A MethodTable contains an array of structures that describes each interface implemented by the class (directly declared or indirectly declared).
Generic type instantiations (in C# syntax: C<ty_1,…,ty_n>) are represented by MethodTables, i.e. a new MethodTable gets allocated for each such instantiation. The entries in these tables (i.e. the code) are, however, often shared.
MethodDesc
Method descriptor is a data structure used to store important information for a single method.
