C#一个简单的含参数,控件调用多线程调用
} public void myStaticThreadMethod(int n) { for (int i = 0; i < n; i++) { this.Invoke((EventHandler)delegate { this.label1.Text ="gisoracle"+ n.ToString(); }); } } private void button1_Click(object sender, EventArgs e) { Thread thread1 = new Thread(() => myStaticThreadMethod(10)); thread1.Start(); // 只要使用Start方法,线程才会运行 }