■
Note
It is also possible to perform a “pre-JIT” of an assembly when installing your application using the
ngen.exe
command-line tool that ships with the .NET Framework 3.5 SDK. Doing so may improve startup time
for graphically intensive applications.
The Role of .NET Type Metadata
In addition to CIL instructions, a .NET assembly contains full, complete, and accurate metadata,
which describes each and every type (class, structure, enumeration, and so forth) defined in the
binary, as well as the members of each type (properties, methods, events, and so on). Thankfully, it
is always the job of the compiler (not the programmer) to emit the latest and greatest type meta-
data. Because .NET metadata is so wickedly meticulous, assemblies are completely self-describing
entities.
To illustrate the format of .NET type metadata, let’s take a look at the metadata that has been
generated for the Add() method of the C# Calc class you examined previously (the metadata gener-
ated for the VB .NET version of the Add() method is similar):
C H A P T E R 1
Do'stlaringiz bilan baham: |