Thread 实例化

 1     //运行实例方法
 2 
 3     class Program {
 4         public void myThreadMethod()
 5         {
 6             Console.WriteLine("myThreadMethod");
 7         }
 8         static void Main(string[] args) 
 9         {
10             Thread thread2 = new Thread(new Program().myThreadMethod);
11             thread2.Start();
12             Console.ReadLine();
13         }
14 
15         
16     }

 

posted on 2018-09-19 16:51  fortwater  阅读(108)  评论(0编辑  收藏  举报

导航