.NET 中的模块是什么? [英] What is a module in .NET?

查看:18
本文介绍了.NET 中的模块是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到底什么是模块?模块、类和函数之间有什么区别?如何在 C# 中访问模块?

What exactly is a module? What is the difference between a module, a class and a function? How can I access a module in C#?

我问这个是因为我想在运行时计算仅某些特定函数的 IL 代码的校验和(不使用代码签名).

I am asking this because I want to calculate a checksum of the IL code of only some particular functions, at runtime (without using code signing).

推荐答案

模块是程序集中代码的逻辑集合.一个程序集中可以有多个模块,每个模块可以用不同的 .NET 语言编写(VS,据我所知,不支持创建多模块程序集).

A module is a logical collection of code within an Assembly. You can have multiple modules inside an Assembly, and each module can be written in different .NET languages (VS, as far as I'm aware, doesn't support creation of multi-module assemblies).

程序集包含模块.模块包含类.类包含函数.

Assemblies contain modules. Modules contain classes. Classes contain functions.

是的,您可以在运行时通过反射访问程序集、模块、类、函数、属性、字段等.

Yes you can access assemblies, modules, classes, functions, properties, fields etc all via reflection at runtime.

这篇关于.NET 中的模块是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆