开发者

how c# compiler works? [closed]

开发者 https://www.devze.com 2022-12-16 01:34 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_如何转开发
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_如何转开发

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 5 years ago.

Improve this question

how c# compiler works??

how it parses our whole solutions and .cs files... i want to know where it start and how everything works... i want to know from the asp.net perspective...

thx


If you're really interested in how a C# compiler works, you may want to read the source code from Mono's compiler, mcs.


Eric Lippert gave a great synopsis of the C# compiler in this answer.


A really brief explanation could be:

  • In Asp.net, you write an page.aspx file that get compiled into a .Net assembly, this assembly is then used by the Asp.Net runtime that execute http request.
  • This .Net assembly can be written in any .Net language like c# or VB.Net. But in the end, the code is compiled by the .Net CLR compiler into a Common Intermediary Language(CIL). This CIL is used by the CLR runtime which get loaded when you start a .Net process. The JIT then use this CIL and transform it into pure assembly that will be understandable by the computer.
0

精彩评论

暂无评论...
验证码 换一张
取 消