Mid LINQ

Select employee with second-highest salary?

Select employee with second-highest salary

var secondHighest = employees

.OrderByDescending(e => e.Salary)

.Skip(1)

.FirstOrDefault();

✅ Skips the top salary and selects the next one.

More from LINQ Tutorial

All questions for this course