If you start file download async, then you should handle
DownloadFileCompleted
event. async download means that you want to do the task in another thread, not to wait for it to complete. therefore you have to handle this event to progress on that job further when it finished. thread sleep doesn't guarantee that your download will finish in that sleep time, as in your case.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
namespace Test_WebClient
{
class Program
{
static void Main(string[] args)
{
try
{
WebClient cl = new WebClient();
cl.DownloadFileCompleted += cl_DownloadFileCompleted;
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
static void cl_DownloadFileCompleted(object sender,
System.ComponentModel.AsyncCompletedEventArgs e)
{
}
}
}