【发布时间】:2011-06-08 13:16:25
【问题描述】:
可能重复:
C# Lambda ( => )
例如
Messenger.Default.Register<AboutToCloseMessage>(this, (msg) =>
{
if (msg.TheContainer == this.MyContainer) // only care if my container.
{
// decide whether or not we should cancel the Close
if (!(this.MyContainer.CanIClose))
{
msg.Execute(true); // indicate Cancel status via msg callback.
}
}
});
【问题讨论】:
-
@Shakti Singh:您能告诉我们如何搜索
=>符号吗? -
@Shakti Singh:如果 Rdeluca 知道
=>的意思是“lambda 表达式”,他一开始就不会问了。 -
是的.. 不知道它被称为 lambda 或者我会搜索它。谢谢!