The Role of Metadata

Metadata plays a very important role in the world of .NET, providing both runtime and tools with a plethora of information about your assemblies, the contained types, and their members. Thanks to metadata, you have rich tooling such as IntelliSense helping you find certain functionality exposed on types in a variety of contexts (for example, with awareness of visibility). All information about what’s available and how it behaves is kept in metadata.

But it goes way beyond that. Compilers leverage the same metadata to emit sound code that drives your code at runtime. For example, method calls get resolved into the right tokens in intermediate language (IL) referencing the target method. All the runtime then has to do is make ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.