SUMMARY

Closures are an important mechanism to fully support functional approaches in a programming language. This chapter has shown how they work and when the compiler employs them in C#. For scenarios like the previously explained async pattern, closures are a convenient mechanism; for some functional techniques they are a vital basis.

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.