2
Posted on 5:46 AM by Softminer and filed under ,


Task[] tasks = new Task[1000];
 
for (int i = 0i < 1000i++)
{
tasks[i= Task.Factory.StartNew(() =>
{
Console.WriteLine(System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss.fff tt"));
});
}
Task.WaitAll(tasks);
2
Responses to ... How to create dynamic tasks in C#
Jim said... August 3, 2015 at 1:48 PM

You da man for this!!!!

Anonymous said... February 22, 2018 at 7:13 PM

i am getting exception on task.waitall(task) statement....