---
title: "Lambda Expressions in C#"  
description: "Lambda Expressions in C#"  
author: "Anonymous User"  
published: 2015-11-27  
updated: 2015-11-27  
canonical: https://www.mindstick.com/forum/33653/lambda-expressions-in-c-sharp  
category: "c#"  
tags: ["c#", ".net"]  
reading_time: 2 minutes  

---

# Lambda Expressions in C#

I want to use [Lambda Expressions](https://www.mindstick.com/forum/159557/c-plus-plus-lambda-expressions-how-does-the-compiler-interpret-them) in c# how to use please help me.

## Replies

### Reply by Anonymous User

[Lambda](https://www.mindstick.com/blog/181/lambda-expression-in-c-sharp) [expressions](https://www.mindstick.com/forum/33876/what-is-the-syntax-for-lambda-expressions-in-vb-dot-net) are anonymous functions that contain expressions or sequence of operators. All lambda expressions use the lambda operator =>, that can be read as “goes to” or “becomes”. \
The left side of the lambda operator specifies the input parameters and the right side holds an expression or a code block that works with the entry parameters. Usually lambda expressions are used as predicates or instead of delegates (a type that references a method).\
Expression Lambdas\
Parameter => expression\
Parameter-list => expression\
Count => count + 2;\
Sum => sum + 2;\
n => n % 2 == 0\
The lambda operator => divides a lambda expression into two parts. The left side is the input parameter and the right side is the lambda body.

```
using System;using System.Collections.Generic;using System.Linq;public static class Lambda{    public static void Main()    {        List<int> list = new List<int>() { 1, 2, 3, 4, 5, 6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 };        List<int> evenNumbers = list.FindAll(x => (x % 2) == 0);        Console.Write("Even numbers :");        foreach (var num in evenNumbers)        {                       Console.Write("{0} ", num);        }        Console.WriteLine();        Console.Read();    }}
```

c![Lambda Expressions in C#](https://www.mindstick.com/mindstickforums/438e81cc-9f46-403c-a309-0c63dd809488/images/56cb03a4-5c0d-41ad-8b91-2428b2ad0d6d.png)


---

Original Source: https://www.mindstick.com/forum/33653/lambda-expressions-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
