相同点

两者都有:manifest、metadata、IL

不同点

1、assembly 有main程序函数。module只能附属于程序集,程序集可以拥有多个。

2、metadata的差异

程序集特有的部分:无论是DLl或EXE都有自生程序集描述的部分,而模块没有。这个包含程序集版本 公钥 等信息。这就程序集和模块根本性不同的地方,模块由于没有这一部分信息所以无法被程序直接加载。

Assembly
-------------------------------------------------------
    Token: 0x20000001
    Name : Main
    Public Key    :
    Hash Algorithm : 0x00008004
    Version: 0.0.0.0
    Major Version: 0x00000000
    Minor Version: 0x00000000
    Build Number: 0x00000000
    Revision Number: 0x00000000
    Locale: <null>
    Flags : [none] (00000000)
    CustomAttribute #1 (0c000001)
    -------------------------------------------------------
        CustomAttribute Type: 0a000001
        CustomAttributeName: System.Runtime.CompilerServices.CompilationRelaxationsAttribute :: instance void .ctor(int32)
        Length: 8
        Value : 01 00 08 00 00 00 00 00                          >                <
        ctor args: (8)

    CustomAttribute #2 (0c000002)
    -------------------------------------------------------
        CustomAttribute Type: 0a000002
        CustomAttributeName: System.Runtime.CompilerServices.RuntimeCompatibilityAttribute :: instance void .ctor()
        Length: 30
        Value : 01 00 01 00 54 02 16 57  72 61 70 4e 6f 6e 45 78 >    T  WrapNonEx<
                      : 63 65 70 74 69 6f 6e 54  68 72 6f 77 73 01       >ceptionThrows   <
        ctor args: ()

    CustomAttribute #3 (0c000003)
    -------------------------------------------------------
        CustomAttribute Type: 0a000003
        CustomAttributeName: System.Diagnostics.DebuggableAttribute :: instance void .ctor(value class DebuggingModes)
        Length: 8
        Value : 01 00 07 01 00 00 00 00                          >                <
        ctor args: ( <can not decode> )

【C# 程序集】C# assembly和module 根本区别的更多相关文章

  1. C#程序集系列05,让程序集包含多个module

    本篇体验在一个程序集中包含多个module. □ 创建3个module →删除F盘as文件夹中的一些文件,只剩下如下3个文件→用记事本打开MyFirstModule.cs文件,修改如下,并保存 usi ...

  2. C#程序集系列04,在程序集包含多个module的场景下理解关键字internal

    本篇在一个程序集包含多个module的场景下体验internal的含义. →查看F盘as文件夹下的文件→删除MainClass.exe→把MyFirstModule和MySecondModule组装到 ...

  3. C#提高-------------------Assembly和Module的使用-------反射内涵

    转 :C#反射技术概念作用和要点 反射(Reflection)是.NET中的重要机制,通过放射,可以在运行时获得.NET中每一个类型(包括类.结构.委托.接口和枚举等)的成员,包括方法.属性.事件,以 ...

  4. Assembly.Load()方法,Assembly.LoadFrom()方法,Assembly.LoadFile()方法的区别!

    参考: http://www.cnblogs.com/benwu/archive/2009/10/24/1589096.html http://www.cnblogs.com/xuefeng1982/ ...

  5. C# 程序集(Assembly)

    程序集 程序集是代码进行编译是的一个逻辑单元,把相关的代码和类型进行组合,然后生成PE文件.程序集只是逻辑上的划分,一个程序集可以只由一个文件组成,也可由多个文件组成.不管是单文件程序集还是多文件程序 ...

  6. CommonJS 规范中的 module、module.exports 区别

    CommonJS 规范中的 module.module.exports 区别 CommonJS规范规定,每个模块内部,module变量代表当前模块.这个变量是一个对象,它的exports属性(即mod ...

  7. eclipse中build path与Web Deployment Assembly的作用,区别

    转自:https://blog.csdn.net/heart_mine/article/details/79402792 以下内容只为做个笔记记录已下,有问题可以留言,欢迎补充. 今天在eclipse ...

  8. Android 培训准备资料之project与module的区别(1)

    project和module的区别? 现在我们来看看在Android studio中怎样新建一个project (1)file->new->new project. Application ...

  9. .NET程序集(Assembly)

    在.NET 中,新引入了一个程序集的概念,就是指经由编译器编译得到的,供CLR进一步编译执行的那个中间产物,在WINDOWS系统中,它一般表现为.dll,或者是.exe的格式,但是要注意,它们跟普通意 ...

随机推荐

  1. cesium结合geoserver利用WFS服务实现图层编辑(附源码下载)

    前言 cesium 官网的api文档介绍地址cesium官网api,里面详细的介绍 cesium 各个类的介绍,还有就是在线例子:cesium 官网在线例子,这个也是学习 cesium 的好素材. 内 ...

  2. QMainWindow(二)

    mainwindow.h: #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> class MainWindo ...

  3. golang中使用zap日志库

    1. 快速使用 package main import ( "go.uber.org/zap" "time" ) func main() { // 1. sug ...

  4. MySQL函数学习(一)-----字符串函数

    一.MySQL 字符串函数 \ 函 数 名 称 作 用 完 成 1 LENGTH 计算字符串字节长度 勾 2 CONCAT 合并字符串函数,返回结果为连接参数产生的字符串,参数可以是一个或多个 勾 3 ...

  5. 微服务探索之路03篇-docker私有仓库Harbor搭建+Kubernetes(k8s)部署私有仓库的镜像

    ❝ 目录: 微服务探索之路01篇.net6.0项目本地win10系统docker到服务器liunx系统docker的贯通 微服务探索之路02篇liunx ubuntu服务器部署k8s(kubernet ...

  6. 利用JGrapht对有向无环图进行广度优先遍历

    环境需求:JDK:1.8 jar:jgrapht-core-1.01.jar package edu; import org.jgrapht.experimental.dag.DirectedAcyc ...

  7. plsql 将游标读取到table中

    -- 将游标中的数据 读取到table中 根据部门编号获得emp所有信息. declare cursor c(no emp.deptno%type)is select * from emp where ...

  8. fastjson、jackson以及son-lib的使用

    fastjson前言 fastJson是阿里巴巴出品的一个json序列化工具. 引入依赖 <dependency> <groupId>com.alibaba</group ...

  9. JDBC工具包commons-dbutils的基本介绍

    感谢原文作者:simonXi-tech 原文链接:https://blog.csdn.net/simonforfuture/article/details/90480147 更多请查阅在线API文档: ...

  10. C 数组排序后输出至文件

    如题 C实现 #include<stdio.h> #define COUNT 9 //数组长度+1 #define FILE_NAME "data.txt" //文件名 ...