문제

I read topic from google and I understand this:

  1. Windows loader loads the exe or dll of .net app.
  2. Then windows loader creates clr for that process.
  3. Then it locates entry point to application and call it.
  4. But before that class loader service of clr comes and loads the class containing Main method.
  5. And then jit compilation takes place.
  6. The clr provoids services like gc,exception handling,class loading etc to our app.

My questions are:

Now when we run .net app clr locates entry point and starts execution . But when it encounters

Class1 ob = new Class1();  

that time how our process calls the service of CLR called as class loader? MSIL code equivalent to is newobj internally calls to clr's class loader service?

도움이 되었습니까?

해결책

It takes a lot of effort in understanding the internal working of CLR. But if you are interested go through this CLR Internal Workings

The site gives an extensive and detailed explanation of CLR working.

Specifically your answer comes under the ObjectInstance section in the site.They have used

SmallClass obj = new SmallClass();

to explain the functionality.

Hope it helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top