我有一个URL,当我们单击它时会下载文件,我想从URL中读取该文件的内容,并在c#中的本地计算机中复制该文件的副本,我该如何实现?
using (var client = new WebClient())
{
client.DownloadFileAsync("http://weburl", "filename.extension");
}
will save to "current folder",put filepath if you want to save to particular location from
https://docs.microsoft.com/en-us/dotnet/api/system.net.webclient
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.