Pages

Sunday, October 31, 2010

The .NET Framework - Metadata & Assemblies

MSIL and JIT
When you compile a C# program, the compilation does not directly generate native (operating system-specific) code; it generates code written in Microsoft Intermediate Language (MSIL or IL). The MSIL code is translated to native code at run time. This compilation phase is called the just-in-time (JIT) compilation.

Metadata
During compilation, the CLR creates information about your application. It includes class names, field names, method names, and method parameters. This information is called metadata, which means information on data. Metadata is used by the CLR and the Jitter (JIT compiler) for many purposes such as debugging and type checking. You can also use metadata to create instances of the classes and use class members regardless of the source code language.

Assemblies
The program compilation results in creating an assembly, which can be either an .exe file (executable) or a .dll file (library). An assembly contains:
  • The manifest that contains the metadata, which provides the following information:
    • Versioning information. The versioning information contains four parts: major version, minor version, build number, and revision number (for example, 1.0.32.72005)
    • Security information
    • External assembly references
    • Exported types
    • Culture information (the national language such as English, French, or Chinese)
    • Custom attributes such as company name and product information
  • One or more modules of MSIL code
  • The resources used by the application


    yahoo domains personals 

    Share/Bookmark
    Related Posts Plugin for WordPress, Blogger...

    Popular Posts

    Share |