예제 #1
0
        static void Main(string[] args)
        {
            ThreadTest test = new ThreadTest();

            // test.test();
            // test.test1();
            test.test2();
            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            ThreadTest test   = new ThreadTest();
            Thread     thread = new Thread(new ThreadStart(test.MyThread));

            //启动线程
            thread.Start();
            Console.ReadKey();
        }
예제 #3
0
 /// <summary>
 /// Thred测试按钮单击事件,带一个参数
 /// </summary>
 /// <param name="sender">按钮单击事件对象</param>
 /// <param name="e">按钮单击事件参数信息</param>
 private void btn_Hello_Click(object sender, EventArgs e)
 {
     ThreadTest.StartTest("Hello");
 }
예제 #4
0
 /// <summary>
 /// Thred测试按钮单击事件,不带参数
 /// </summary>
 /// <param name="sender">按钮单击事件对象</param>
 /// <param name="e">按钮单击事件参数信息</param>
 private void btn_Thread_Click(object sender, EventArgs e)
 {
     ThreadTest.StartTest();
 }