I am using a console app as a proof of concept and new need to get an async return value.
I figured out that I need to use Task.WaitAll() in my main m
For best practice, use the new async way of doing things. Instead of
Task.WaitAll use await Task.WhenAllTask.WaitAny use await Task.WhenAnyThe code above can be written as:
var task1 = GetAsync(1);
var task2 = GetAsync(2);
var results = await Task.WhenAll(task1, task2);
var result1 = results[0];
var result2 = results[1];