zoukankan      html  css  js  c++  java
  • 认识IL

    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”

    就会出现如下界面:

    image

    这就是ILDasm工具的界面。

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

    如下图:

    image

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

    image

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

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

    .class表明HelloWorld是个类


  • 相关阅读:
    win7与centos虚拟机的共享文件夹创建
    MySQL视图
    MySQL分区表与合并表
    PHP读写XML文件的四种方法
    备份与恢复
    MySQL日志
    MySQL锁问题
    优化数据库对象
    ActiveReport资料
    对ArrayList 进行深拷贝
  • 原文地址:https://www.cnblogs.com/HeroBeast/p/1339576.html
Copyright © 2011-2022 走看看