© Vaskaran Sarcar 2018
Vaskaran SarcarInteractive C#https://doi.org/10.1007/978-1-4842-3339-9_11

11. Flexibilities with Anonymous Functions

Vaskaran Sarcar
(1)
560066 Bangalore, Karnataka, India
 

Anonymous Methods and Lamda Expressions

Teacher starts the discussion: Let’s go back to our delegate program (DelegateEx1). I have added few lines of code to that program to generate the same output. To help you to understand the differences among invocations, I have kept the old stuffs as it is.
Notice the additional stuff. These additional blocks of code can help you better understand anonymous methods and lambda expressions. Anonymous methods were introduced in C# 2.0 and lambda expressions were introduced in C# 3.0.
As the name suggests, a method without ...

Get Interactive C#: Fundamentals, Core Concepts and Patterns 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.