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);
}
}
浙公网安备 33010602011771号