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

前端 未结 13 1049
南方客
南方客 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条回答
  •  佛祖请我去吃肉
    2020-11-28 19:50

    In many respects, .NET assemblies are similar to Java bytecode packages.

    1. Yes. They also contain manifests and other data, but the CIL is part of the exe/dll.
    2. Use ILDasm or Reflector - most people would say Reflector, as it is much more powerful. Both will show you what CIL was produced. Wikipedia has a list of all CIL instructions, for a better feel (it is assembly like).
    3. I guess it is meant as an assembly of code. A good way to differentiate it from native.

提交回复
热议问题