My code looks like this:
private static WebClient wc = new WebClient;
...
wc.DownloadFileAsync(URL, FilePath);
wc.DownloadProgressChanged += (s, ev) =>
{
//Do stuff
};
wc.DownloadFileCompleted += (s, ev) =>
{
//All the rest of the code
};
However, as soon as DownloadFileAsync is executed, the program immediately closes leaving me with a 0KB file instead of the downloaded file (no error occurs). I believe that it just completely ignores DownloadProgressChanged and executes the code inside the brackets. I'm just assuming