What’s the difference or relationship between Type and TypeInfo?

From the MSDN docs:

A TypeInfo object represents the type definition itself, whereas a
Type object represents a reference to the type definition. Getting a
TypeInfo object forces the assembly that contains that type to load.
In comparison, you can manipulate Type objects without necessarily
requiring the runtime to load the assembly they reference.

So the Type provides a shallower representation of the object data, i.e, providing the name of the type as a string.

Where as TypeInfo provides a richer representation of the type including lists of members, implemented interfaces, and the base type.

The differences are explained in greater detail here.

Leave a Comment