using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{ Task t1 = new Task(() =>
{
for (int i = ; i < ; i++)
{
System.Threading.Thread.Sleep();
Console.WriteLine("TASK1 do something" + i);
}
}); Task t2 = new Task(() =>
{
for (int i = ; i < ; i++)
{
System.Threading.Thread.Sleep();
Console.WriteLine("TASK2 do something" + i);
}
}); Task t3 = new Task(() =>
{
for (int i = ; i < ; i++)
{
System.Threading.Thread.Sleep();
Console.WriteLine("TASK3 do something" + i);
}
});
t1.Start();
t2.Start();
t3.Start();
Task.WaitAll(t1, t2, t3);
Console.WriteLine("over");
Console.ReadLine();
}
}
}