WebClient DownloadFile 用法

using (WebClient myWebClient = new WebClient())
                {
                    try
                    {
                        myWebClient.DownloadFile(new Uri(href), System.IO.Path.Combine(globePath, System.IO.Path.GetRandomFileName() + System.IO.Path.GetExtension(href)));
                    }
                    catch (Exception ex)
                    {
                     
                    }
                }

  

原文地址:https://www.cnblogs.com/hbsfgl/p/5022191.html