程序集和命名空间程序、空间

2023-09-05 02:52:19 作者:杀手的诗

难道一切都在一个单一命名空间编译成自己的组件?

Does everything in a single namespace compile into its own assembly?

推荐答案

没有,你可以有一个组件内的多个命名空间。在VS方面,你能想到的组件作为一个项目。一个解决方案中的每个项目,被编译到它自己的程序集。虽然内集会,你可以有多个命名空间。

No, you can have multiple namespaces within an assembly. In VS terms, you can think of an assembly as a project. Each project within a solution, gets compiled into it's own assembly. Within an assembly though, you can have multiple namespaces.