What is MSIL?

 Posted by Ddd on 2/10/2011 | Category: .NET Framework Interview questions | Views: 60302 | Points: 40

MSIL : Microsoft Intermediate Language

It is a set of CPU independent instructions that are generated by the language compiler when the project is compiled. MSIL code is not executable but further
processed by CLR/other runtime environments before it becomes executable.
MSIL is contained in the assembly of the .NET application.

MSIL instructions map to the code that is written in .NET Language and are used for loading, storing, initializing, and
calling methods on objects, as well as for
arithmetic and logical operations, control flow, direct
memory access, exception handling, and other operations.

CLS(Common language Specification) provides the infrastructure for MSIL.


1)MSIL provides language interoperability as the code in any .NET language is compiled into MSIL.

2)Same performance for all the .NET Languages:

3)Support for different runtime environments:

CLR can understand MSIL.

Non .NET environments also support MSIL.

The JIT Compiler in CLR converts the MSIL code into native machine code which is then executed by the OS

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response