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?
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?
Check that question out, its linked questions are also good.
By the way, mscorlib.dll is not the CLR, it just contains the basic managed types (see that question).
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