0

I encountered a problem that in my visual studio 2012. System.Net namespace does not contain their classes. NET version 4.0. This code not compile, require class WebClient:

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

enter image description here

John Saunders
  • 160,644
  • 26
  • 247
  • 397
user2058005
  • 125
  • 2
  • 10

1 Answers1

5

Make sure that your project has a reference to the System.dll.

Florian
  • 5,918
  • 3
  • 47
  • 86