First, we are not "importing" anything here. The "
using
" clause is a pure syntactic sugar used to resolve the names, if you will. Also, name spaces themselves have nothing to do with relationship between assemblies — you can have different name spaces in the same assembly; and, in this case, will you say that the assembly "imports" itself once and then again? :-) All essential stuff happens only when you add a reference to a project.
So, first, this is strictly the same:
using System.Data;
DataTable myTable;
and
System.Data.DataTable myTable;
Secondly, using the type in this example is only possible when the assembly "System.Data.dll" (found in the CAG) is referenced by an assembly you build.
Finally, having a common part "
System
" in the name spaces like "
System
" and "
System.Data
" says absolutely nothing about their relationship. They might be related or they might be not. Name spaces naming is totally unrelated. As I say, you can have different name space in the same assembly, but you also can use the same name space in totally unrelated assembly. For example, you can name your own name space "
System.Data
" and use it with the one from the assembly "System.Data.dll". Names of the name spaces are grouped only for convenience for only one purpose: name resolution.
—SA