Untitled
unknown
plain_text
3 years ago
634 B
8
Indexable
using System;
using System.Threading;
class Program
{
static void Main(string[] args)
{
Thread t1 = new Thread(() =>
{
for (int i = 1; i <= 5; i++)
{
Console.WriteLine("Thread 1: " + i);
Thread.Sleep(1000);
}
});
Thread t2 = new Thread(() =>
{
for (int i = 1; i <= 5; i++)
{
Console.WriteLine("Thread 2: " + i);
Thread.Sleep(1000);
}
});
t1.Start();
t2.Start();
Console.ReadKey();
}
}
Editor is loading...