Working with LET keyword in LINQ.

Posted by vishalneeraj-24503 under LINQ category on | Points: 40 | Views : 430
In LINQ,LET keyword plays an important role.In general,in dot net we declare any variable whether they are integer,string,boolean and so on.So in LINQ,LET mean the same i.e. LET is used for declaring any variable inside query expression.
For Example:-
var emp_names = new string[]{"vinod","saroj","vinay","rahul","vishal"};
var output =
from employees in emp_names
let emp_length = employees.Length
where emp_length > 2
orderby emp_length
select employees;

Comments or Responses

Posted by: Samarmir on: 10/31/2014 Level:Starter | Status: [Member] | Points: 10
What is the output of above linq query ?

Login to post response