Last active
May 27, 2018 15:43
-
-
Save NikolaZivkovicPackt/626b33e4f483b07fb237b18ccf2115c6 to your computer and use it in GitHub Desktop.
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 listOfInts = new List<int>() { 1, 2, 3 }; | |
var tasks = new List<Task>(); | |
foreach (var integer in listOfInts) | |
{ | |
var task = WaitThreeSeconds(integer); | |
tasks.Add(task); | |
} | |
await Task.WhenAll(tasks); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment