<<

MSIL & it’s Advantages

Microsoft Intermediate Language (MSIL) is a language used as the output of a number of (C#, VB, .NET etc.).

A .NET (C#, VB, J# etc.) does not compile into code; instead it compiles into an intermediate code called Intermediate Language (MSIL). As a programmer one need not worry about the syntax of MSIL - since our in automatically converted to MSIL. The MSIL code is then send to the CLR () that converts the code to machine language, which is, then run on the host machine. MSIL is similar to Java Byte code. MSIL is the CPU- independent instruction set into which .NET Framework programs are compiled. It contains instructions
for loading, storing, initializing, and calling methods on objects. Combined with and the common , MSIL allows for true cross- language integration Prior to , MSIL is converted to .

It is also called Intermediate Language (IL) or Common Intermediate Language (CIL). During the , the convert the source code into Microsoft Intermediate Language (MSIL) .Microsoft Intermediate Language (MSIL) is a CPU- independent set of instructions that can be efficiently converted to the native code. During the runtime the Common Language Runtime (CLR)'s Just In Time (JIT) compiler converts the Microsoft Intermediate Language (MSIL) code into native code to the Operating System.

When a compiler produces Microsoft Intermediate Language (MSIL), it also produces Metadata. The Microsoft Intermediate Language (MSIL) and Metadata are contained in a (PE) file . Microsoft Intermediate Language (MSIL) includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, , and other operations

Advantages -

 MSIL provide language interoperability as code in any .net language is compiled on MSIL

 Same performance in all .net languages

 support for different runtime environments

 JIT compiler in CLR converts MSIL code into native machine code which is executed by OS.