Chapter 9. Reflection
Reflection is used to retrieve the internal details of assemblies and types at runtime. Reflection is commonly used to discover which classes exist in an assembly, and which properties, methods, and events exist in a class. Collectively, this information is known as metadata. You can also use reflection to dynamically generate code, instantiate types or call methods by name, and interact with unknown objects. Simply put, reflection is the slightly mind-bending technique of exploring code structures programmatically.
Reflection is a key ingredient in many Microsoft .NET Framework features. For example, reflection is required to support Microsoft ASP.NET data binding, to pre-compile regular expression classes, and to allow some ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access