I am new to asynchronous programming with the async
modifier. I am trying to figure out how to make sure that my Main
method of a console applicati
You can do this without needing external libraries also by doing the following:
class Program
{
static void Main(string[] args)
{
Bootstrapper bs = new Bootstrapper();
var getListTask = bs.GetList(); // returns the Task>
Task.WaitAll(getListTask); // block while the task completes
var list = getListTask.Result;
}
}