Chapter 3

Functions, Delegates, and Lambda Expressions

WHAT’S IN THIS CHAPTER?

  • Functions and methods
  • Considerations for reuse
  • Anonymous functions and lambda expressions
  • Extension methods
  • Referential transparency

Almost all programming languages have a means of defining blocks of code and of declaring certain execution sequences as belonging together, usually for the purpose of reusability as well as for structural and maintenance reasons. The details of these mechanisms vary considerably between languages.

Get Functional Programming in C#: Classic Programming Techniques for Modern Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.