Part I:The .NET Framework
After using one of the language compilers, your code is compiled down to Microsoft
Intermediate Language. Microsoft Intermediate Language, known as MSIL or simply IL, is a
CPU-independent set of instructions that can be easily converted to nati ve code. The metadata
is also contained within the IL.
Figure 1-4: Managed code execution process.
The IL is CPU-independent. This means that IL code is not reliant on the specific computer
that generated it. In other words, it can be moved from one computer to another (as long as the
computer supports the .NET Framework) without any complications. This i s what makes X-
Copy, or just copying over the application, possible.
After IL, the code that you started with will be compiled down even furt her by the JIT
compiler to machine code or native code. The IL contains everything that is needed to do this,
such as the instructions to load and call methods and a number of other operations.
The .NET Framework contains one or more JIT compilers that compile your IL code down to
machine code, or code that is CPU-specific. This is done when the applic ation is executed for
the first time.
You will notice this process after you build your first ASP.NET page. Af ter you build any
ASP.NET page, you compile the page down to IL. When you go to the browse r and call the
page by typing its URL in the address bar, you notice a slight pause of a few seconds as the
computer seems to think about what it is doing. It is actually calling t his IL code and
converting it with a JIT compiler to machine code. This happens only the first time that
someone requests the page. After the first time, you can hit F5 to refre sh the page, and the
page is immediately executed. The page has already been converted to mac hine code and is
now stored in memory. The CLR knows the JIT compiler has already compile d the page.
Therefore, it gets the output of the page from memory. If you later make a change to your
ASP.NET page, recompile, and then run the page again, CLR detects that t here was a change