I am learning .NET framework programming model.
When a managed exe is run(so no machine code in it),how does the CLR(mscorlib.dll) take over and do JIT compilation,or who calls the CLR or is it running all the time?
A managed executable still contains a standard Portable Executable (link)* header that contains information about :
The PE header is read by windows when launching any application - in the case of a .NET application the header identifies it as a managed assembly and execution is then transferred to the CLR.
*See : .NET, metadata, and the PE format section