The class itself is stored in the code of your assembly and its
metadata. .NET is one of the platform where all the information on all types is stored in the corresponding assemblies. .NET metadata is one of the central concepts of .NET; it makes
reflection possible. You really need to learn it:
Type Class (System)[
^],
Reflection (computer programming) - Wikipedia, the free encyclopedia[
^],
Metadata and Self-Describing Components[
^],
Reflection in the .NET Framework[
^].
The central class is the class
System.Type
(referenced above). The instance of this class holds all one may need to use the type, including the references to the IL code of each method. All this can be retrieved using reflection.
The term "reference" is related to the
instance of the class, not class. Nevertheless, the instance always keep the reference to its type, it can be retrieved via the method
System.Object.GetType()
:
Object.GetType Method (System)[
^].
—SA