在一段程序里可以有几个面名空间.如:
namespace System {
}
namespace System1 {
}
namespace System2 {
}
 using System;
    using System.Collections;
    using System.Runtime.InteropServices;
    using System.Runtime.CompilerServices;namespace System {
........
}
表示你定义的命名是公用了.

namespace System {    using System;
    using System.Collections;
    using System.Runtime.InteropServices;
    using System.Runtime.CompilerServices;
.........
}

namespace System1 {
}
namespace System2 {
}
里就调用不到
 using System;
 using System.Collections;
 using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
的命名空间了.

解决方案 »

  1.   

    这个道理跟在过程中定义变量和在过程外面定义变量是一个道理
    比如:
    public string test()
    {
        string s;
        
    }
      

  2.   

    同意楼上的,其实就是个全局和局部的关系。如果只有一个namespace 就没关系了
    多了就用第二种!我的第一次发言怎么没上来?:-(
      

  3.   

    to: guoweidong(※『孤独~寂) 
    谢谢,我们的项目用第一种方法,在引用时出现了不少问题,总是出现了多重引用,现在明白怎么解决了,谢谢