开发者

What is this C# syntax called?

开发者 https://www.devze.com 2022-12-15 11:27 出处:网络
In C#, you can do something开发者_JAVA技巧 like this: SomeFunction (() => { DoSomething (); }); What is the name of this syntax (the () => ...)?This is called Lambda ExpressionIt\'s a paramet

In C#, you can do something开发者_JAVA技巧 like this:

SomeFunction (() => {
    DoSomething ();
});

What is the name of this syntax (the () => ...)?


This is called Lambda Expression


It's a parameterless lambda expression.

0

精彩评论

暂无评论...
验证码 换一张
取 消