繁体中文
设为首页
加入收藏
当前位置:.Net技术首页 >> 评论及其它 >> .Net Assembly初接触

.Net Assembly初接触

2005-01-09 20:54:16  作者:sharpbladepan  来源:互联网  浏览次数:1  文字大小:【】【】【
简介:简单的一段代码://main.cs using System; class MyMainClass{    public static void Main()     {        Console.WriteLine("Main prog...
关键字:.Net Assembly 接触

简单的一段代码:

//main.cs

using System;

class MyMainClass

{

public static void Main()

{

Console.WriteLine("Main program!");

}

}

编译成main.exe后用ildasm.exe反编译了一下,生成如下的manifest:

// Metadata version: v2.0.40607

.assembly extern mscorlib

{

.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..

.ver 2:0:3600:0

}

.assembly main

{

.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )

.hash algorithm 0x00008004

.ver 0:0:0:0

}

.module main.exe

// MVID: {D8F028FF-4E4B-46B6-8E5C-A7245623C097}

.imagebase 0x00400000

.file alignment 0x00000200

.stackreserve 0x00100000

.subsystem 0x0003 // WINDOWS_CUI

.corflags 0x00000001 // ILONLY

// Image base: 0x043B0000

红色部分的估计就是assembly manifest了。

责任编辑:admin
相关文章