Created
May 31, 2017 14:09
-
-
Save ramons03/2ccfd0d5bd4dfbce44081835f4dcf386 to your computer and use it in GitHub Desktop.
LINQ async options with lambda using whenall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tasks = foos.Select(DoSomethingAsync).ToList(); | |
await Task.WhenAll(tasks); | |
var results = await Task.WhenAll(tasks); | |
return await Task.WhenAll(tasks); | |
var tasks = foos.Select(foo => DoSomethingAsync(foo)).ToList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment