C# – How to download a file to a specific path in from a given url in a windows form


I need to download pdf files from a specified links(url) to a specific folder in a windows application using winforms please any one can suggest me with a solution.

Best Solution

using System.Net;

using (WebClient webClient = new WebClient())
    webClient.DownloadFile("http://mysite.com/myfile.txt", @"c:\myfile.txt");