L
L
littleguga2015-10-12 15:06:54
.NET
littleguga, 2015-10-12 15:06:54

How to show message after all webClient.DownloadFileAsync completed?

There are several webClients that run in a loop like this:

WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler((sender, e) => download_completed(sender, e, id, size));
webClient.DownloadFileAsync(new Uri(url_load), filename);

How to track that all asynchronous downloads have completed?
Thanks in advance for your reply!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2015-10-12
@littleguga

Why not decrement the counter of remaining downloads in download_completed and wait until it becomes zero?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question