asp.net中的assembly和nameSpaces有什么区别 [英] What is the difference between assembly and nameSpaces in asp.net

查看:163
本文介绍了asp.net中的assembly和nameSpaces有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

asp.net中的assembly和nameSpaces之间有什么区别。

我问它是因为它会让我进入这么多的采访。

What is the difference between assembly and nameSpaces in asp.net.
I asked it because it would asked me into So many interviews.

推荐答案

您是否尝试在互联网上找到答案?



以下是程序集的MSDN定义: -



程序集是.NET Framework应用程序的构建块;它们构成了部署,版本控制,重用,激活范围和安全权限的基本单元。程序集是一组类型和资源的集合,这些类型和资源构建为一起工作并形成逻辑功能单元。程序集为公共语言运行库提供了识别类型实现所需的信息。对于运行时,在程序集的上下文之外不存在类型。



命名空间,另一方面是一个集合类。它更适用于你班级的逻辑组织。
And did you try to find the answer on internet?

Here is MSDN definition for an assemblies:-

Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.

A namespace, on the other hand is a collection of classes. Its more used for logical organization of your classes.


简而言之:

汇编:

An程序集提供了物理代码分组的基本单元。

它是一个输出单元。它是部署和部署的一个单位。版本控制单元。程序集包含MSIL代码。



命名空间:

命名空间提供逻辑代码分组的基本单位。 br />
这是一个名称集合,其中每个名称都是唯一的。

它们构成了一组类的逻辑边界。

必须指定名称空间在项目属性中。



参考:

http://msdn.microsoft.com/en-us/library/ms973231.aspx [ ^ ]



并且更喜欢 google [ ^ ],它会在快速时间内为您提供大约1,380,000个结果(0.38秒)。
In short:
Assembly:
An assembly provides a fundamental unit of physical code grouping.
It is an Output Unit. It is a unit of Deployment & a unit of versioning. Assemblies contain MSIL code.

Namespace:
A namespace provides a fundamental unit of logical code grouping.
It is a Collection of names wherein each name is Unique.
They form the logical boundary for a Group of classes.
Namespace must be specified in Project-Properties.

Refer:
http://msdn.microsoft.com/en-us/library/ms973231.aspx[^]

And prefer google[^], it will give you huge results About 1,380,000 results (0.38 seconds) in quick time.


查看答案。 [ ^ ]


这篇关于asp.net中的assembly和nameSpaces有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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