Destroying Threads : Thread Abort : Thread C# Examples


C# Examples » Thread » Thread Abort »

 

Destroying Threads









    
using  System;
using  System.Threading;

class  MainClass
{
    static  int  MyCount  =  0;
    static  void  Main(string[]  args)
    {
        MyClassThread  me  =  new  MyClassThread();
        Thread  MyNewThread  =  new  Thread(new  ThreadStart(me.MyThread));

        MyNewThread.Start();
        if  (MyCount  ==  0)
            MyNewThread.Abort();
    }
}

class  MyClassThread
{
    public  void  MyThread()
    {
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Thread
» Thread Abort