WebClient下载文件

public void DownDile(string url)
{

WebClient client = new WebClient();

string URLAddress = @"https://www.cnblogs.com/images/cnblogs_com/1439107348s/1295915/o_%e5%ad%a4%e7%8b%ac%e7%9a%84%e5%b7%a1%e7%a4%bc.jpg"; 

string receivePath = @"E:360ALl";
var downx= receivePath+@""+ System.IO.Path.GetFileName(URLAddress);
client.DownloadFile(URLAddress,downx);

}

原文地址:https://www.cnblogs.com/1439107348s/p/9896880.html