using System; 
using System.Threading; 
public class MyThread  
{
    public void ThreadPriorityTest()  
  { 
   for (int i = 0; i < 10; i++)  
   { 
    Thread thr = Thread.CurrentThread; 
    Console.WriteLine(thr.Name + "=" + i); 
    Thread.Sleep(1) ; 
   } 
  } 
} 
public class MyClass  
{ 
  public static void Main()  
  { 
   Console.WriteLine("߳̿ʼ֮ǰ"); 
   MyThread ts1 = new MyThread(); 
   MyThread ts2 = new MyThread();
   Thread thp1 = new Thread(new ThreadStart(ts1.ThreadPriorityTest));
   Thread thp2 = new Thread(new ThreadStart(ts2.ThreadPriorityTest));
   thp1.Name = "߳1";
   thp2.Name = "߳2";
   thp1.IsBackground =true;
   thp2.IsBackground =true;
   thp1.Start();
   thp2.Start(); 
   Console.WriteLine("߳̽");
  } 
} 
