Download / Launch a Program

I'm new to C#. Been working with it for about 2 months. My code probably isn't great.

 

My goal:

Download and launch a file as soon as the download has finished. It can't freeze my GUI or mess up my progress bar, though, so I believe it must be async.

 

My problem:

My code tries to launch the file immediately and doesn't wait for the download to complete. Thread.Sleep isn't a solution.

My download methods.

An example file download.

 

I can't seem to find a simple way around this. I would love some advice. I love you so much if you can solve this for me. Thanks all! 🙂

by cuddlychops06 via /r/csharp

Leave a Reply