Chapter 28. Reflection

In This Chapter

  • Discovering Program Information

  • Dynamically Activating Code

  • Reflection.Emit

Reflection is the capability to inspect the metadata of a program and gather information about its types. Using reflection, it's possible to learn about program assemblies, modules, and all types of internal program elements.

This is particularly useful for design tools, supporting the automated building of code based on user selections derived from the metadata of the underlying types being used. Reflection also provides excellent support for late-bound frameworks where runtime determination is required for selecting required libraries or other functionality on-the-fly.

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