0
下面的代码工作得很好,但我正在寻找一种方式来所有3合并成只有一个调用语句:调用MethodInvoker代表在一个时间超过1个项目
this.Invoke(new MethodInvoker(delegate() {
String.Format(
"------------------------------------------------------------")
);
}));
this.Invoke(new MethodInvoker(delegate() {
String.Format(
"- END " + archiveFullName + " -"
);
}));
this.Invoke(new MethodInvoker(delegate() {
String.Format(
"------------------------------------------------------------")
);
}));
我已经尝试过:
this.Invoke(new MethodInvoker(delegate() {
listBox1.Items.Add(
this.listBox1.Items.Add("--------------------------------------------------------")
this.listBox1.Items.Add("- END " + archiveFullName + " -")
this.listBox1.Items.Add("-------------------------------------------------------")
);
}));
但这似乎并不奏效。
任何决议将是伟大的!
非常感谢肯尼! – StealthRT