I am trying to loop through a list of tasks and offset the start of each task by a specific amount of seconds like:
Int32 delayTime = 1500;
List<Task> tasks = new List<Task>();
// .... add stuff to task list.
tasks.ForEach(task =>
{
Task.Delay(delayTime);
task.Start();
delayTime += 1500;
});
However, the above starts all tasks together not taking in account the task delay. Is there a way to stagger a list of tasks, or structure it differently so I can start each task a few seconds after the previous one starts?