---
title: "What is the syntax for Lambda Expressions in VB.NET?"  
description: "What is the syntax for Lambda Expressions in VB.NET?"  
author: "Manoj Bhatt"  
published: 2016-01-14  
updated: 2016-01-15  
canonical: https://www.mindstick.com/forum/33876/what-is-the-syntax-for-lambda-expressions-in-vb-dot-net  
category: "c#"  
tags: ["c#", ".net"]  
reading_time: 2 minutes  

---

# What is the syntax for Lambda Expressions in VB.NET?

[Sorry](https://yourviews.mindstick.com/view/81321/ekta-kapoor-s-sorry-is-not-acceptable) for dumb [question](https://www.mindstick.com/blog/23175/how-to-solve-neet-question-paper-in-less-time), but I can not proper [understanding](https://www.mindstick.com/articles/12918/cat-5e-vs-cat-6a-understanding-the-major-differences) of the [lambda expression](https://www.mindstick.com/forum/159550/how-to-implement-an-interface-with-two-abstract-methods-by-a-lambda-expression).please give me a appropriate answer?\

\

## Replies

### Reply by Anupam Mishra

In C#, **[Lambda](https://www.mindstick.com/blog/181/lambda-expression-in-c-sharp) expressions** reduce the amount of work needed when iterating through data. All enumerable data is queryable through LINQ with use of a SQL-like query (what I mean by that is the query looks like SQL, but is a different flavor). LINQ has an in-built mechanism to loop through enumerable data and use certain conditions setup in the where clauses to filter the data. LINQ queries are quite effective in what they do.

Lambda expressions work in a similar way. Some of the existing extension methods feature built-in lambda expressions to perform certain actions and to make it easier to perform repetitive work. We shall see this soon. Lambda expressions do not require extension methods to work, but this is the most common usage currently.

For example,

```
static void Main()    {     List<int> elements = new List<int>() { 100,200,300,400 };      // ...  Find index of first even element.     int Index = elements.FindIndex(x => x % 2 = 0); //Here we using lambda expression     Console.WriteLine(Index);    }
```

\

As you can see, it is really easy to use lambda expressions and embeds them in your applications. They really add a lot of functionality to an application. Lambda expressions are commonly exposed through static methods, but they can be used in other situations as well. Extension methods are not required, though this is the most common usage in the .NET Framework as of now.\


---

Original Source: https://www.mindstick.com/forum/33876/what-is-the-syntax-for-lambda-expressions-in-vb-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
