C# compiling to MSIL code

2k Views Asked by At

Does the Microsoft C# compiler (CSC.exe) have an option to output the Intermediate Language files? Kind of like the -S switch does in GCC?

2

There are 2 best solutions below

1
GBegen On BEST ANSWER

You can use ildasm.exe to extract the IL from the assembly compiled by csc.exe.

4
Will Eddins On

Your final executables and DLLs are stored in IL.

To see what I mean, download .NET Reflector, open one of your DLLs or executables, and switch the language to IL. It will also go through translating the IL into C# for you.