Reflection

The .NET runtime depends heavily on the existence of metadata and the ability to inspect and manipulate it dynamically. The BCL exposes this via a set of abstract classes that mirror the significant elements of an application (assemblies, modules, types, and members) and provide support for creating instances of BCL types and new types on the fly (see Section 3.10 in Chapter 3).

For more information, see the following namespaces:

System.Reflection
System.Reflection.Emit

Important types in other namespaces include:

System.Type
System. Activator
System.AppDomain.

Get C# Essentials 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.