using System; using System.Threading; public class MainClass { public static int Main() { Thread X = new Thread(new ThreadStart(Sleep)); X.Start(); X.Interrupt(); X.Join(); return 0; } public static void Sleep() { try { Thread.Sleep(Timeout.Infinite); }catch (ThreadInterruptedException e){ Console.WriteLine("Thread Interupted"); }catch(ThreadAbortException e){ Thread.ResetAbort(); } } }
Thread Interupted