Query expression to get minimal item which matches using LINQ

Amatya
Posted by Amatya under LINQ category on | Points: 40 | Views : 1259
Query expression to get minimal item which matches using LINQ
var dnfList = new List<int> { 7, 5, 12, 15 };
int dnfMin = (from dnf in dnfList where x > 10 select dnf).Min();



Result
dnfMin 12

Thanks

Comments or Responses

Login to post response