简体   繁体   English

命名空间System.Net为空

[英]namespace System.Net empty

I encountered a problem that in my visual studio 2012. System.Net namespace does not contain their classes. 我在Visual Studio 2012中遇到一个问题。System.Net命名空间不包含其类。 NET version 4.0. NET 4.0版。 This code not compile, require class WebClient: 此代码无法编译,需要类WebClient:

using System.Net;
public static class Program {
public static void Main(string[] args)
{
        WebClient client = new WebClient();
}

在此处输入图片说明

确保您的项目具有对System.dll的引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM