Suresh Sundar
Success is journey, not a destination, always.
Tuesday, 1 April 2014
linq get second highest number or salary
Use this query:
var employees = Employees
.GroupBy(e => e.Salary)
.OrderByDescending(f => f.Key)
.Skip(1).Take(1)
.First();
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment