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)
                    {
                     
                    }
                }

  

posted @ 2015-12-05 20:16  hbsfgl  阅读(1187)  评论(0编辑  收藏  举报