我在2012年的视觉工作室遇到了一个问题。System.Net命名空间不包含它们的类。NET 4.0版。此代码未编译,需要类WebClient:
using System.Net;
public static class Program {
public static void Main(string[] args)
{
WebClient client = new WebClient();
}

发布于 2013-12-26 11:31:58
确保您的项目有对System.dll的引用。
https://stackoverflow.com/questions/20784055
复制相似问题