C# – How to download a web page using C#

c

How to download a web page using C#?

Best Answer

You could use WebClient:

using (var client = new WebClient())
{
    string content = client.DownloadString("http://www.google.com");
}