12,162
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Net;
namespace AutoUpdate
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
public class clsDownLoad2
{
public clsDownLoad2()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public bool DownLoad(string strRemoteFile, string strLocalFile)
{
WebClient wc = null;
try
{
wc = new WebClient();
wc.DownloadFile(strRemoteFile, strLocalFile);
}
catch
{
return false;
}
finally
{
if(wc!=null)
{
wc.Dispose();
wc = null;
}
}
return true;
}
}
}