Reflection

An assembly is a piñata stuffed with goodies such as type information, MSIL code, and custom attributes. You use reflection to break open the assembly piñata to examine the contents. Reflection adds many important features to .NET, such as metadata inspection, run-time creation of types, late binding, MSIL extraction, and self-generating code. These features are crucial to solving complex real-world problems that developers face every day.

The Reflection namespace is the container of most things related to reflection. Assembly, Module, LocalVariableInfo, MemberInfo, MethodInfo, FieldInfo, and Binder are some of the important types and members of the Reflection namespace. There are also some reflection-related attributes in the Reflection ...

Get Programming Microsoft® Visual C#® 2008: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.