this.BeginInvoke( (Action) (()=>
{
this.txtLongestWord.Text = this.longestWord;
}));

1. Lamdba 表达式是一个委托类型:
MethodInvoker invoker = () => { Console.WriteLine(); }; //is actually equal to the following form.
MethodInvoker invoker = delegate() { Console.WriteLine(); };
//这里是Lamdba 表达式的匿名委托的用法

2. Lamdba 表达式可以用作匿名方法
MethodInvoker invoker = new MethodInvoker(() => { Console.WriteLine(); }); //相当于:
MethodInvoker invoker = new MethodInvoker(MyFunc);
partial void MyFunc(){Console.WriteLine();}



相关文章:

  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2021-12-11
  • 2021-10-02
  • 2021-06-11
  • 2021-10-14
  • 2020-07-25
猜你喜欢
  • 2022-12-23
  • 2021-07-31
  • 2021-12-12
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
相关资源
相似解决方案