I am reading the book CLR via C# by Jeffrey Richter.
In Chapter 23(23.3.2), it says "A System.Type object represents a type reference(as opposed to a type definition)."
What do the type reference and type definition mean here?
The author is contrasting System.Type with System.TypeInfo. From the documentation:
A TypeInfo object represents the type definition itself, whereas a Type object represents a reference to the type definition.
The System.TypeInfo for a class can only be instantiated if the assembly that implements the class (the type definition) is loaded or loadable. To instantiate a System.Type, the only requirement is that the current program contains a reference to the implementing assembly.
See also What's the difference between Type and TypeInfo?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With