Esempio n. 1
0
 public static void DownFile(string url, string localfn, int len = 0)
 {
     using (WebClient client = new WebClient())
     {
         client.DownloadFile(url, localfn);
     }
     if (len > 0)
     {
         Util.Assert((long)len == FileEx.GetFileLength(localfn), "下载文件大小出错");
     }
 }