两者有什么区别?
Invoke((MethodInvoker) delegate {
checkedListBox1.Items.RemoveAt(i);
checkedListBox1.Items.Insert(i, temp + validity);
checkedListBox1.Update();
}
);
对比
Invoke((MethodInvoker)
(
() =>
{
checkedListBox1.Items.RemoveAt(i);
checkedListBox1.Items.Insert(i, temp + validity);
checkedListBox1.Update();
}
)
);
有什么理由使用 lambda 表达式吗?并将(MethodInvoker)
委托和 lambda 转换为 MethodInvoker 类型吗?什么样的表达不需要(MethodInvoker)
演员表?