O'Reilly logo

Applied Microsoft® .NET Framework Programming by Jeffrey Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Obtaining a Reference to a System.Type Object

Reflection is most commonly used to learn about types or to manipulate objects using information that is typically known only at run time, not at compile time. Obviously, this dynamic exploring and manipulation of types and objects comes at a performance hit, so you should use it sparingly. In addition, a compiler can’t help you locate and fix programming errors related to type safety when you’re using reflection.

The System.Type type is your starting point for doing type and object manipulations. System.Type is an abstract base type derived from System.Reflection.MemberInfo (because a Type can be a member of another type). The FCL provides a few types that are derived from System.Type: System.RuntimeType ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required