顶楼主你一下。     
http://qzshi.com     
网站建设技术论坛   
另外招版主,或合作管理员,有兴趣的加群4228406

解决方案 »

  1.   


        class Program
        {
            private static ManualResetEvent resetEvent;        public static void Main()
            {
                resetEvent = new ManualResetEvent(false);            Thread thread1 = new Thread(ThreadMethod1);
                Thread thread2 = new Thread(ThreadMethod2);            thread2.Start();
                Thread.Sleep(1000); //让2先运行。测试效果            thread1.Start();            Console.Read();
            }        private static void ThreadMethod1()
            {
                Console.WriteLine("Thread 1: A");            resetEvent.Set();
                resetEvent.WaitOne();            Console.WriteLine("Thread 1: B");
            }        private static void ThreadMethod2()
            {
                resetEvent.WaitOne();            Console.WriteLine("Thread 2: C");            resetEvent.Set();
                resetEvent.WaitOne();            Console.WriteLine("Thread 2: D");
            }
        }