C#C
C#3y ago
joren

❔ => operator

So I read while looking into LINQ documentation that => is the syntax for a lambda expression. Now in the context of LINQ it makes sense, I would've guessed already. However in a class:
class A
{
  int foo() => 34;
}


I would assume it is not seen as a lambda, it should just be a class method as its just syntax sugar for:
int foo() { return 34; }
Was this page helpful?