rliq
May 27th, 2009, 01:50 AM
This is in Silverlight 2.0, just in case that matters...
If I have some code similar to the following:
for (int i = 0; i < 10; i++)
{
WebClient client = new WebClient();
client.DownloadStringCompleted +=
new DownloadStringCompletedEventHandle(client_DownloadStringCompleted);
client.DownloadStringAsync(new Uri(i.ToString(), UriKind.Relative));
}
I know when each of the downloads completes, as my handler is called for each one.
My question is. What is the correct way to determine that ALL of the downloads have completed?
If I have some code similar to the following:
for (int i = 0; i < 10; i++)
{
WebClient client = new WebClient();
client.DownloadStringCompleted +=
new DownloadStringCompletedEventHandle(client_DownloadStringCompleted);
client.DownloadStringAsync(new Uri(i.ToString(), UriKind.Relative));
}
I know when each of the downloads completes, as my handler is called for each one.
My question is. What is the correct way to determine that ALL of the downloads have completed?