代码:

private void button5_Click(object sender, EventArgs e)
{
int val = ; Task.Factory.StartNew(() =>
{
MessageBox.Show("测试StartNew:无参数");
}); Task.Factory.StartNew(a =>
{
MessageBox.Show("测试StartNew:参数值" + (int)a);
}, val);
}
04-13 10:24