using System; using System.Threading; public class Try { public static Random rand = new Random(); public String result; public Try(String s) { result = s; } public void Run() { for (int i = 0; i < 4; i++) { int dt = rand.Next(3000); // Console.WriteLine("dt = {0}", dt); Thread.Sleep(dt); System.Console.WriteLine(result); } } public static void Main() { Try t1 = new Try("Orel"); Try t2 = new Try("Reshka"); Thread thread1 = new Thread(new ThreadStart(t1.Run)); Thread thread2 = new Thread(new ThreadStart(t2.Run)); thread1.Start(); thread2.Start(); } }