wget/curl in C# wget/curl in C# curl curl

wget/curl in C#


You can use System.Net.WebClient, which is the simplest interface for downloading resources in .NET. If you need more control on the requests look at HttpWebRequest.

For WebClient, just instantiate an instance, and call one of the Download methods which fits your needs:

var cli = new WebClient();string data = cli.DownloadString("http://www.stackoverflow.com");


WebRequest is one of the .NET classes for retrieving web content.

A good library to parse the HTML is the HTML Agility Pack that can also directly download the page.