Getting results back (wait for all results) after firing async task




I think this is a very common scenario where a method would fire off several async tasks and then waits for result to result somewhere down the line.

var task1 = DoWorkAsync();
var task2 = DoMoreWorkAsync();
//then somewhere down the line 
await Task.WhenAll(task1, task2);

Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm