CLR

What does CLR do after the IL is generated and machine
language is generated .Will it look for main method ?

Questions by ushalakshmi   answers by ushalakshmi

Showing Answers 1 - 16 of 16 Answers

atulsetu

  • Aug 6th, 2008
 

Microsoft developed a new runtime environment known as the Common Language Runtime (CLR). The CLR includes the Common Type System (CTS) for cross-language type compatibility and the Common Language Specification (CLS) for ensuring that third-party libraries can be used from all .NET-enabled languages.

  Was this answer useful?  Yes

CLR won't look for main. the code developed using c# or vb.net or etc is not understood by clr .it knows only IL code. The language types and code is not understood by clr.
so, after converting into IL only clr understands.

  Was this answer useful?  Yes

The services of CLR like the memory management,Garbage collector will be carried on once the IL and Machine Language is generated. Assemblies will be created for the project and the lifetime of objects so created in use is managed upon.

  Was this answer useful?  Yes

v_n_r

  • Dec 23rd, 2009
 

Once IL and Machine Language is generated, by using CLR, JIT(just in time) compiles the IL files, where it converts the code to Operating System understandable.


CLR translates this MSIL code into an executable code when the program is executed making the program to run in any environment for which the CLR is implemented.

When .Net program is executed CLR activates the JIT compiler, where JIT compiler converts MSIL code into native code (OS understandable).


SeeSharp

  • Feb 20th, 2010
 

When assembly is loaded for execution CLR component -JIT compiler convert it into machine specific code, after that CLR loads the required references and dll required by assembly and then for any type of application (Console or GUI) Main method is executed as starting point of assembly. 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.