开发者

Do an assembly have multiple namespaces or is composed of single namespace

开发者 https://www.devze.com 2022-12-28 03:14 出处:网络
Can an开发者_StackOverflow assemble have multiple namespaces or is composed of single namespace. An assemblies is a collection of code - objects, methods, properties, and other resources.

Can an开发者_StackOverflow assemble have multiple namespaces or is composed of single namespace.


  • An assemblies is a collection of code - objects, methods, properties, and other resources.
  • A Namespace is a logical groupings of those things.

An assembly can contain multiple namespaces, because it can contain multiple logical groupings of objects and methods. Most assemblies I've seen are a single namespace, just for clarity, but there's no reason a single assembly couldn't contain a dozen different namespaces.


The hierarchy is: Assemblies contain Resources and Modules.

Modules contain Fields,Methods, and Types.

Types may be qualified by any arbitrary namespace, provided that it doesn't conflict with another existing Type.

Assemblies can short circuit past the Module level directly to all Types contained in all Modules in the assembly (via GetType() or GetTypes()).


Assemblies can have multiple namespaces.


Please see the msdn article Understanding and Using Assemblies and Namespaces in .net, that should clear up what does assembly mean and what does namespace mean.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号