//1. this.Invoke(new ThreadStart(delegate { textBox1.AppendText("11111" + "\r\n"); })); //2. this.Invoke(new MethodInvoker(delegate { textBox1.AppendText("11111" + "\r\n"); })); //3. this.Invoke(new Action( () => { textBox1.AppendText("11111" + "\r\n"); })); //4. this.Invoke(new EventHandler(delegate { textBox1.AppendText("11111" + "\r\n"); }));
时间: 2024-10-28 14:06:16