当我运行代码时,此代码 ui表单块有什么问题。ui表单块
private void button2_Click(object sender, EventArgs e)
{
Task t1 = new Task( check2);
Task t2 = new Task( check2);
t1.Start();
t2.Start();
}
private void check2()
{
for (int a=0 ; a <= 100000; a++)
{
this.Invoke(new Action(() =>
{
listBox2.Items.Add(a);
}
}
}