using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace ThreadsExample { class Program { static void MethodOne() { Console.Write("A"); try { Thread.Sleep(500); } catch (ThreadInterruptedException ex) { Console.Write("B"); } Thread.Sleep(500); Console.Write("C"); } static void MethodTwo() { Console.Write("E"); Thread.Sleep(250); Console.Write("F"); } static void Main(string[] args) { Thread one = new Thread(MethodOne); Thread two = new Thread(MethodTwo); one.Start(); two.Start(); Thread.Sleep(100); one.Interrupt(); Thread.Sleep(100); Console.Write("G"); two.Join(); Console.Write("H"); one.Join(); Console.WriteLine(); } } }