How can I view MSIL / CIL generated by C# compiler? Why is it called assembly?

前端 未结 13 1026
南方客
南方客 2020-11-28 18:53

I\'m new to .NET C# programming. I\'m following few books. It is said that instead of compiling it directly to binary code (Native code). High level code is converted into i

13条回答
  •  -上瘾入骨i
    2020-11-28 19:37

    I know this is an old question, and I'd prefer any of the tools above. However, in a pinch, there has been an MSIL viewer in the box with Visual Studio since at least Version 2005.

    The tool is named ildasm.exe, and is located in the following folders after default Visual Studio installations:

    Visual Studio 2005 "C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\ildasm.exe"

    Visual Studio 2008 "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\ildasm.exe"

    Visual Studio 2010 "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\ildasm.exe"

    For more information, see: "How to: View Assembly Contents" in the MSDN Library.

提交回复
热议问题