C# 14 · Async, errors and resources
Run tasks in parallel
Start several tasks and wait for all of them.
var results = await Task.WhenAll(urls.Select(u => http.GetStringAsync(u)));
C# 14 · Async, errors and resources
Start several tasks and wait for all of them.
var results = await Task.WhenAll(urls.Select(u => http.GetStringAsync(u)));
Was this page helpful?