Task.WhenAll

A .NET method that returns one task which completes when all the tasks you pass it have completed.

In more detail

Start independent operations first, then await Task.WhenAll once, and their waits overlap instead of adding up. If several fail, await rethrows the first and the task's Exception holds them all.

Example

await Task.WhenAll(DelayAsync(1), DelayAsync(2), DelayAsync(3));

Related terms

Taught in

References