By using our mini forum, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy

Q: I cannot see (run) the WebClient class in C#?

+4 votes

I cannot see and run WebClient class in C#, use it's methods and download something. I have this warning:

Error    1    The type or namespace name 'WebClient' could not be found (are you missing a using directive or an assembly reference?)

asked in C# category by user ak47seo
edited by user golearnweb

2 Answers

+2 votes
Best answer

Did you add

using System.Net;

at the top?

answered by user eiorgert
Thanks! It is working now! :-)
+1 vote

Or you can use ReSharper: to add some stuff automatically ;-)

See the video to understand better:

or this one - created by Resharper's user (not the creator JetBrains):

answered by user hues
edited by user golearnweb
Good suggestion! Just installed Resarper - coding is faster now! :-) thanks!