C#4.0 新特性 - 匿名方法,lambds
匿名方法:
Action<string> action = new Action<string>(delegate(string name)
{
MessageBox.Show("Hello" + name);
});
action(“aaa”);
lambds:
Action<string> action = aa => { MessageBox.Show(aa); };
action(“aaa”);