如何終止這種方法/下載功能?如何終止C#中的異步函數
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庫文章的備註部分。 –