C H A P T E R 24
Reflection and Attributes
- Metadata and Reflection
- The Type Class
- Getting a Type Object
- What Is an Attribute?
- Applying an Attribute
- Predefined, Reserved Attributes
- More About Applying Attributes
- Custom Attributes
- Accessing an Attribute
Metadata and Reflection
Most programs are written to work on data. They read, write, manipulate, and display data. (Graphics are a form of data.) For some types of programs, however, the data they manipulate is not numbers, text, or graphics, but information about programs and program types.
- Data about programs and their classes 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’s running. When a running ...
Get Illustrated C# 2012 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.