我想直接从网址下载文件(例如:http://iranfairco.com/icon/Iranfairco.png
)
并将此文件保存在我们的服务器上。
我该怎么做?
最佳答案
您可以使用WebClient.DownloadFile(url,local)
例如
WebClient webClient = new WebClient();
webClient.DownloadFile("http://iranfairco.com/icon/Iranfairco.png",@"c:\mypng.png");
关于c# - 下载直接文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7744480/