I have an array with filenames, and i want to download them from the server, but once i start a download, it must finish before i star a new one. I don't know how to make it wait, provided that the loop is inside a Download_COmple ted event function...
Here is the code:
Here is the code:
Code:
while (l <= j-1)
{
label1.Text = "Baixando " + download[l] + "...";
client2.DownloadFileAsync(new Uri(url + download[l]), download[l]);
client2.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
l++;
}
Comment