using System; using System.Threading; class CRunMain { public static void Main(string[] args) { Thread objThread1 = new Thread(new ThreadStart(CRunThread.Run1)); Thread objThread2 = new Thread(new ThreadStart(CRunThread.Run2)); Console.WriteLine("------------- Main Thread Start --------------"); objThread1.Start(); objThread2.Start(); Console.WriteLine("------------- Main Thread End --------------"); } }; class CRunThread { public static void Run1() { while (true) { Console.WriteLine("This is Thread 1!"); Thread.Sleep(1000); } } public static void Run2() { while (true) { Console.WriteLine("This is Thread 2!"); Thread.Sleep(1000); } } };