Lambda Expressions
摘要
The inclusion of lambda expressions (often termed as lambdas) enhanced the C# programming language. These are powerful alternatives to anonymous methods. C# 2.0 introduced anonymous methods, and C# 3.0 introduced lambda expressions. Nowadays, lambda expressions are more popular than anonymous methods. Why? They are typically a perfect fit for inline declarations, more expressive, and easier to read. You often see lambda expressions while working with delegates, events, and LINQ. Since this pocketbook focuses on delegates and events, this chapter analyzes the uses of lambda expressions in those contexts.