public class MyThread  
{ 
    public void Thread1()  
    { 
        for (int i = 0; i < 10; i++)  
        { 
            Thread thr = Thread.CurrentThread; 
            Console.WriteLine(thr.Name + "=" + i); 
            Try 
            { 
                Thread.Sleep(1) ; 
            } 
            catch (ArgumentException ae)  
            { 
                Console.WriteLine(ae.ToString() ); 
            } 
            catch (ThreadInterruptedException tie) 
            { 
                Console.WriteLine(tie.ToString() ); 
            } 
            catch (SecurityException se)  
            { 
                Console.WriteLine(se.ToString() ); 
            } 
        } 
    } 
} 
