Skip to content

Instantly share code, notes, and snippets.

@NikolaZivkovicPackt
Last active May 27, 2018 15:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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