using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace MutlipleThreads { class Program { static void Main(string[] args) { Console.WriteLine("Demonstrating creating multiple threads"); Console.WriteLine("======================================="); // Create a NumberPrinter object that will go up in steps of 5. NumberPrinter printer = new NumberPrinter(5); Info info1 = new Info { From = 100, To = 200, Pause = 1 }; Thread thread1 = new Thread(new ParameterizedThreadStart(printer.Print)); thread1.Name = "Thread 1"; thread1.Start(info1); Info info2 = new Info { From = 200, To = 300, Pause = 2 }; Thread thread2 = new Thread(new ParameterizedThreadStart(printer.Print)); thread2.Name = "Thread 2"; thread2.Start(info2); Console.ReadLine(); } } }