
reflection. Typically, you start with a System.Type object when you reflect upon types in the assem-
bly. You can get hold of one of these type instances by using the typeof keyword in C#, by calling
System.Assembly.GetType(), and a few other ways. Generally, the typeof keyword is more efficient
because it is computed at compile time, whereas GetType(), although more flexible since you can
pass it an arbitrary string, is executed at run time. Once you have a type object, you can find out if it
is a class, an interface, a struct, or so on, what methods it has, and the number and types of fields it
contains.
■Note If you’re wondering, “Why metadata?”, ...