Chapter 24. Reflection and Attributes

Metadata and Reflection

Most programs are written to work on data. They read, write, manipulate, and display data. (Graphics are a form of data.) The types that you as the programmer create and use are designed for these purposes, and it is you, at design time, that must understand the characteristics of the types you use.

For some types of programs, however, the data they manipulate is not numbers, text, or graphics, but information about programs and program types themselves.

  • Data about programs and their types is called metadata, and is stored in the programs' assemblies.

  • A program can look at the metadata of other assemblies or of itself, while it is running. When a running program looks at its own metadata, ...

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