What is the Lambda in C#

Now we are going to learn about the Lambda in C#.
  • 3638

Introduction

The lambda is an unnamed function and it is generally used for creating delegates in LINQ. It is easily manipulate without a declaration of method that is return value, declaration or access modifier is called Lambda. There is question arise in our mind that why we required Lambda answer is that because it allow to create short write method on the same place where were you used a method only once. And where definition of method is very short. It reduced your time to write method to contain class.

Advantages of method

1. If you somewhere look method definition you don't required to read the code.
2. It reduced your time on typing the program.

Sign of the  Lambda

In the programming languages we have use sign(=>) of Lambda.

Generally we defined Lambda as 
Parameter=>Execution code

Example of the Lambda.

m=>n%2==1
m is the input parameter
m%2==1 is the expression

© 2019 DotNetHeaven. All rights reserved.