在一段程序里可以有几个面名空间.如:
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;
的命名空间了.
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;
的命名空间了.
解决方案 »
- 网络上传输文件使用的什么方法啊
- 事务处理,能否使用同一个SqlConneciton对象?
- 求助!!Master如何通过委托触发页面事件?
- 获取GirdView中绑定列的值的问题?
- 在CS里定义的公共变量,在ASPX页面里<%=%>输出,为什么直接就显示成"<%=变量%>"这样的字符??晕死!
- 请问一个小问题
- 关于datalist里的linkbutton问题
- 关于类的静态与非静态构造函数
- 我准备做一个权限系统,请大家给点意见
- 想学ASP.NET,但又没有VS.NET环境, 只有WIN2KSERVER, 装哪些软件才能开发?
- 断点不能工作(在debug环境非release环境中)
- 绑定问题,在线求助。
比如:
public string test()
{
string s;
}
多了就用第二种!我的第一次发言怎么没上来?:-(
谢谢,我们的项目用第一种方法,在引用时出现了不少问题,总是出现了多重引用,现在明白怎么解决了,谢谢