Tutorial :how c# compiler works? [closed]


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...



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.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »