程序集名称和根命名空间 [英] Assembly name and root namespace

查看:91
本文介绍了程序集名称和根命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

程序集名称和根名称空间之间的重要性是什么?我无法在网上找到一个很好的解释。谢谢。

what is the signifcance between the assembly name and root namespace? I cant find a good explanation online. Thanks.

推荐答案

程序集是编译代码后项目输出的文件,例如DLL或可执行文件。  ; 程序集名称是与程序集关联的元数据的一部分,例如版本号,文化等。 有关详细信息,请参阅装配名称

命名空间只是VS用于帮助整理代码的机制。 默认情况下,根命名空间与项目名称相同。例如,如果您的项目被称为"House",那么那么项目的根名称空间也是"House"。 命名空间名称可以嵌套,因此如果您声明一个名为"Room"的新命名空间,那么在众议院项目中,它将是 House.Room 。  ("root namespace"在这里是"House"。)有关详细信息,请参阅了解和使用.NET中的程序集和命名空间

HTH,
An assembly is the file output by your project after your code is compiled, such as a DLL or a executable.  The assembly name is one part of the metadata associated with the assembly, such as version number, culture, etc.  For more info, see Assembly Names.

Namespaces are simply a mechanism VS uses to help organize your code.  By default, the root namespace is the same name as your project. For example, if your project is called "House," then the root namespace of the project is also "House."  Namespace names can nest, so if you declare a new namespace called "Room" in the House project, then it would be House.Room.  (The "root namespace" here is "House.") For more info, see Understanding and Using Assemblies and Namespaces in .NET.

HTH,


这篇关于程序集名称和根命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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