2020年7月20日星期一

WebClient,DownloadFileAsync,DownloadProgressChanged

static void Main(string[] args)  {   WebClientDownloadProgressChanged();   Console.ReadLine();  }  static void WebClientDownloadProgressChanged()  {   string url = "https://download.microsoft.com/download/d/1/c/d1c74788-0c6b-4d23-896e-67cf849d31ed/SSMS-Setup-ENU.exe";   using(WebClient wc=new WebClient())   {    wc.DownloadProgressChanged += Wc_DownloadProgressChanged1;    wc.DownloadFileAsync(new Uri(url), "ssms.exe");   }  }  private static void Wc_DownloadProgressChanged1(object sender, DownloadProgressChangedEventArgs e)  {   Console.WriteLine($"TotalBytesToReceive:{e.TotalBytesToReceive},BytesReceived:{e.BytesReceived},ProgressPercentage:{e.ProgressPercentage}");  }

 

WebClient,DownloadFileAsync,DownloadProgressChangedDMM笨鸟转运卖家网The phifer group跨境电商ERP能帮助卖家什么?如何选择合适的ERP?GTC冬季去哪里旅游好 冬季去九寨沟游玩全攻略指南介绍春节去哪旅游 推荐12月去云南腾冲旅游推荐攻略指南台北101大楼景点介绍 台湾旅游观光景点推荐给大家

没有评论:

发表评论