C#多线程简单操作
void NewThread() { System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false; MessageBox.Show("子线程"); } private void button1_Click(object sender, EventArgs e) { Thread thread1 = new Thread(new ThreadStart(NewThread)); if (thread1.ThreadState == ThreadState.Unstarted) { thread1.Start(); } }
扫描二维码推送至手机访问