C#多线程的简单应用

1.首先包含头文件

using System.Threading;

2.启动多线程

                Thread t1 = new Thread(ThreadFunctionTest);
                t1.Start();

3.多线程的大循环函数

        public void ThreadFunctionTest()
        {
            while (true)
            {
                textBox2_Output.AppendText("#"); 
                Thread.Sleep(100);
            }      
        }

 

posted on 2020-04-26 10:23  lizhuohui  阅读(6)  评论(0编辑  收藏  举报

导航