Code snippet to find out the values with condition using LINQ

Amatya
Posted by Amatya under LINQ category on | Points: 40 | Views : 440
Code snippet to find out the values using LINQ
List<int> dnfValues = new List<int>() { 0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; 

IEnumerable<int> query = dnfValues .Where(num => num > 5 && num < 10);
//Result: 6,7,8,9

Thanks
Amatya

Comments or Responses

Login to post response