add extra parameter to ProgressChanged event in C#4
问题 Here is my code (Simple Downloader): public void DownloadFile(string urlAddress, string location) { using (webClient = new WebClient()) { webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed); webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged); Uri URL = urlAddress.StartsWith("http://", StringComparison.OrdinalIgnoreCase) ? new Uri(urlAddress) : new Uri("http://" + urlAddress); try { webClient.DownloadFileAsync(URL, location);