采取方法System.Windows.Forms.Control.Invoke(Delegate方法)
为什么会给出编译时错误:
string str = "woop";
Invoke(() => this.Text = str);
// Error: Cannot convert lambda expression to type 'System.Delegate'
// because it is not a delegate type
但这工作正常:
string str = "woop";
Invoke((Action)(() => this.Text = str));
该方法何时需要普通代表?
月关宝盒
墨色风雨
相关分类