Chapter 10: Lambdas, LINQ, and Functional Programming
Although C# is an object-oriented programming language at its core, it is actually a multi-paradigm language. So far in this book, we have discussed imperative programming, object-oriented programming, and generic programming. However, C# also supports functional programming features. Throughout Chapter 7, Collections, and Chapter 8, Advanced Topics, we have already used some of these, such as lambdas and Language-Integrated Query (LINQ).
In this chapter, we'll look at these in detail from the perspective of functional programming. Learning functional programming techniques will help you to write code in a declarative manner that is often simpler and easier to understand than the equivalent imperative code.
The topics that will be covered in this chapter are as follows:
- Functional programming
- Functions as first-class citizens
- Lambda expressions
- LINQ
- More functional programming concepts
By...