gcc has an option of -s to generate assembly source code. Does csc (MS C# compiler) or dmcs (mono C# compiler) have equivalence? I mean do those compilers provide an option to generate IL source code that can be read not the execution binary?
It's very easy to get to the IL: just use ildasm
. The /text
option prints the result to the console, which you can divert to a file.
来源:https://stackoverflow.com/questions/7231983/how-to-generate-il-source-code-with-csc-c-compiler-or-dmcs-mono-c-sharp-comp