-3

When I tried to compile my .cs program on cmd i did > csc HelloWorld.cs, but it directly created a HelloWorld.exe file in the folder. Which contradict what I studied that, cs program is first converted to a byte code(MSIL) and then CLR comes into picture to create a native code. So, can anyone please clear the doubt that is csc.exe is combination of c# compiler + JIT compiler? And if so, then how can I first create the MSIL file and then perform CLR on it using cmd?

  • 4
    The MSIL is packaged in the assembly file (.dll or .exe). See "[Managed Execution Process](https://learn.microsoft.com/en-us/dotnet/standard/managed-execution-process)". – Jonathan Dodds Aug 26 '23 at 13:24
  • 4
    The code in HelloWorld.exe is *not* x86/x64 code. It's MSIL. There's enough information in the header of the .exe file to tell Windows to launch the CLR. – Jon Skeet Aug 26 '23 at 13:27

0 Answers0