1.要编译的代码如下:

using System;
using System.Collections.Generic;
using System.Text;

namespace HellowWorld
{
    class Program
    {
        static void Main()
        {
            Console.Write("Hello World!");
        }
    }
}

 

2.对生成的文件进行反汇编

打开:“Visual Studio 2008 命令提示”,输入“ILDasm.exe”

就会出现如下界面:

认识IL

这就是ILDasm工具的界面。

然后打开我们刚才编译的HelloWorld.exe

如下图:

认识IL

双击:MANIFEST就会看到,这个部分好像是在读取AssemblyInfo.cs文件里面的东西。如下图

认识IL

再看.class private auto ansi beforefieldinit,双击打开,如下图

.class private auto ansi beforefieldinit HellowWorld.Program
       extends [mscorlib]System.Object
{
} // end of class HellowWorld.Program

.class表明HelloWorld是个类

相关文章:

  • 2021-08-12
  • 2021-06-20
  • 2021-11-18
  • 2021-11-08
  • 2022-01-07
  • 2021-11-23
  • 2022-01-11
  • 2021-05-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
相关资源
相似解决方案