Query expression to get maximal item in the List using LINQ

Amatya
Posted by Amatya under C# category on | Points: 40 | Views : 1087
Query expression to get maximal item in the List using LINQ

var dnfList = new List<int> { 50, 76, 43, 69 };
int dnfMax = (from dnf in dnfList select dnf).Max();


Result
dnfMax 76

Comments or Responses

Login to post response