System.Net是一个Namespace而已,它可以实现在任何一个Assembly当中,实际上,System.NET中的类仍然是实现在System.DLL当中的。所以你需要加的是System.dll的引用。 如果你查MSDN的文档,那么在类的overview页底下会有这么一段: 命名空间: System.Net<---- 这个是Namespace,就是using语句用的。平台: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family程序集: System (在 System.dll 中)<---- 这个是Assembly,是csc /r:用的。 如果是用命令行编译,请csc /r:System.dll /out:1.exe Test.cs. 还有,你的VS.Net和 .Net FrameWork的版本是多少? 错误的信息是什么?
如果你查MSDN的文档,那么在类的overview页底下会有这么一段:
命名空间: System.Net<---- 这个是Namespace,就是using语句用的。平台: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family程序集: System (在 System.dll 中)<---- 这个是Assembly,是csc /r:用的。 如果是用命令行编译,请csc /r:System.dll /out:1.exe Test.cs.
还有,你的VS.Net和 .Net FrameWork的版本是多少?
错误的信息是什么?