lambda expression and var keyword in c#

Viewed 17018

Possible Duplicate:
C# Why can't an anonymous method be assigned to var?

I have following statement in c#

Func <int, int, int> add = (x, y) => x + y;

But when I am replacing left hand side statement with following

var add = (x, y) => x + y;

I am getting compiler error(Cannot assign lambda expression to an implicitly-typed local variable).Why?

3 Answers
Related