Using Let Keyword in Linq

added by jalpesh
8/24/2010 1:37:22 PM

3 Kicks, 182 Views

I am using Linq-To-Object in my current project to remove some extra loops and I have found one of the great keyword in Linq called ‘Let’. Let keyword provides facility to declare a temporary variable inside the Linq Query.We can assign the result of manipulation to temporary variable inside query and we can use that temporary variable to another manipulation. Let’s take a simple example of Linq query I am using an integer array to find square and after finding the square of the integer value I will use...