Metadata, reflection and attribute

Metadata is information about the data -- that is, information about the types, code, assembly, and so forth -- that is stored along with your program.

Attributes are a mechanism for adding metadata, such as compiler instructions and other data about your data, methods, and classes, to the program itself. Attributes are inserted into the metadata and are visible through ILDasm and other metadata-reading tools. 

Reflection is the process by which a program can read its own metadata. Its basic three uses:

1. Obtaining Class and Type Information from an Assembly

2. Obtaining Member Information from a Class

3. Dynamically Invoking Methods from Classes in an Assembly

More detail, please refer to:

Programming C#: Attributes and Reflection

C# Reflection and Dynamic Method Invocation

原文地址:https://www.cnblogs.com/taoxu0903/p/1741932.html