tags:

views:

172

answers:

2

In C#, you can do something like this:

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

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

+1  A: 

It's a parameterless lambda expression.

DrJokepu
It's a lambda expression even if it's got a statement body. In fact, "anonymous delegate" doesn't exist as standard C# terminology. It would be an anonymous method if it used the "delegate" keyword. Both anonymous methods and lambda expressions are classified as *anonymous functions*.
Jon Skeet
Jon Skeet: Indeed.
DrJokepu
+12  A: 

This is called Lambda Expression

Moshe Levi