jjzjj

MethodInvoke

全部标签

c# - MethodInvoke 委托(delegate)或 lambda 表达式

两者有什么区别?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();}));有什么理由使用lam