1

Possible Duplicate:
delegate keyword vs. lambda notation

I am using both anonymous methods and lambda expressions, but I couldn't find the difference between those expressions except syntax. Can any one please help me to find out the advantages of lambda expressions? In which scenarios would I need to use lambdas and in which would I need to go use anonymous methods?

Community
  • 1
  • 1

2 Answers2

2

There are subtle differences which is explained by Eric Lippert @

Update:

Another difference is that, Lambda expressions can be represented into Expression tress and can be parsed at runtime. While Anonymous methods can't.

Ramesh
  • 13,043
  • 3
  • 52
  • 88
1

They are same; in a lambda expression you can leave out the definition of your method parameters types, so it is less typing.

A lambda expression is a way to define your function in a mathematical way.

Gabe
  • 84,912
  • 12
  • 139
  • 238
  • I am afraid they are not one and the same. lambda expression can be compiled to expression trees, while the anonymous types cannot. there are more differences if you look from compiler perspective. – Ramesh Jul 26 '12 at 10:54