命名空间还是程序集? [英] Namespace or Assembly?
问题描述
我对命名空间和程序集感到非常困惑.是System.Data
和System.Web
命名空间还是程序集?
I am getting very confused between Namespaces and Assemblies. Are System.Data
and System.Web
Namespaces or Assemblies?
我注意到这些被称为命名空间,同时它们出现在GAC_32
文件夹中.那到底是什么呢?
I have noticed these are called namespaces and at the same time they are present in GAC_32
folder. So what exactly are they?
推荐答案
System.Data
是命名空间,System.Data.DLL
(文件)是程序集.
名称空间是类型的逻辑分组(主要是为了避免名称冲突).程序集可以在多个名称空间中包含类型(System.DLL
包含一些...),并且单个名称空间可以分布在各个程序集中(例如System.Threading
).
A namespace is a logical grouping of types (mostly to avoid name collisions). An assembly can contain types in multiple namespaces (System.DLL
contains a few...), and a single namespace can be spread across assemblies (e.g. System.Threading
).
这篇关于命名空间还是程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!