O'Reilly logo

WCF 4.5 Multi-Layer Services Development with Entity Framework by Mike Liu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lambda expressions

With extension methods and anonymous methods (or inline methods), Visual Studio introduces an expression called the lambda expression.

A lambda expression is actually a syntax change for anonymous methods. It is just another way of writing anonymous methods.

Now, let's learn what a lambda expression is, step by step.

First we need to understand what a delegate is. A delegate is a type that references a method, which means you can define a delegate and then assign a method to it. Once a delegate is assigned a method, it behaves exactly like that method. The delegate method can be used like any other method, with parameters and a return value.

In C# there is a generic delegate type, Func<A,R>, which represents a function taking ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required