Metadata File Format

This section provides a brief description of the logical layout of metadata in files. It provides very superficial coverage of this topic, as this subject is generally considered to be an advanced topic and is beyond the scope of this book.

The creation of metadata follows one of two paths: using an unmanaged API or using a managed API. Unmanaged APIs could be considered a lower–level path; they do not provide much support to ensure that the structures produced are consistent. In contrast, managed APIs form a higher-level path. They were used earlier in this chapter to create a dynamic type.

Logically, a CLR file looks like Figure 3.10. It follows the standard Windows Portable Executable (PE) file layout. The metadata, seen ...

Get Programming in the .NET Environment 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.