【发布时间】:2011-06-26 16:51:52
【问题描述】:
如何终止此方法/下载功能?
private void Download_Click(object sender, EventArgs e)
{
WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
webClient.DownloadFileAsync(new Uri("http://google.com/test.zip"), @"test.zip");
}
基本取消下载功能
【问题讨论】:
-
阅读 MSDN 库文章的备注部分以了解该方法。