14.3. Understanding the Format of a .NET Assembly

Now that you've learned about several benefits provided by the .NET assembly, let's shift gears and get a better idea of how an assembly is composed under the hood. Structurally speaking, a .NET assembly (*.dll or *.exe) consists of the following elements:

  • A Windows file header

  • A CLR file header

  • CIL code

  • Type metadata

  • An assembly manifest

  • Optional embedded resources

While the first two elements (the Windows and CLR headers) are blocks of data you can typically always ignore, they do deserve some brief consideration. Here's an overview of each element.

14.3.1. The Windows File Header

The Windows file header establishes the fact that the assembly can be loaded and manipulated by the Windows family ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition now with O’Reilly online learning.

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