Metadata and Extensibility
This chapter has alluded to metadata attributes rather liberally up to this point without providing a formal definition. Most constructs in CLR metadata have a 32-bit attribute field that is used to fine-tune the definition of the type, field, or method the attribute is associated with. The interpretation and format of these attributes is fixed and is defined in the CLI specification submitted to ECMA. Some of the metadata attributes discussed so far include initonly (field), beforefieldinit (type), and hidebysig (method). One can make these fixed attributes visible via reflection as well as using the unmanaged metadata interface IMetaDataImport.
Compilers are responsible for setting these attributes based on programming ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access