Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post


Check following code example that uses OrderByDescending() and then skip to identify 7th highest salary you can find nth  highest salary using following code , in code example I used FirstOrDefault() to handle null values

var employee = C4uEmployees
   .OrderByDescending(e => e.Salary)
   . FirstOrDefault ();

Share your answer

Share as a guest

Please subscribe me to the CodeChef4U.

By creating your new answer, you agree to the privacy policy and terms of service.