Download a file using the WebClient class

By [)ia6l0 iii

Use the WebClient class from System.Net namespace to download and save a file.

The following code downloads the file and saves it on the path defined.

System.Net.WebClient client = new System.Net.WebClient();
byte [] bytedata = client.DownloadData(url);
client.DownloadFile(url,path);


Download a file using the WebClient class  (1823 Views)