Easy task !
Import the System.Net namespace and after that use the DownloadFile method of the WebClient class:
public void DownloadFile(string link, string destination)
{
using (WebClient webClient = new WebClient())
{
webClient.DownloadFile(link, destination);
}
}
{
using (WebClient webClient = new WebClient())
{
webClient.DownloadFile(link, destination);
}
}
Advertisement
