Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write LINQ query to find 2nd highest salary?



Write LINQ query to find 2nd highest salary?..

Answer / Neeraj Singh Vimal

To find the 2nd highest salary, you can use the `OrderByDescending` and `Skip` methods. Here is an example: n```csharpndecimal secondHighestSalary = employees.OrderByDescending(e => e.Salary) .Skip(1) .FirstOrDefault()?.Salary ?? default(decimal);n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More LINQ Language-Integrated Query Interview Questions

Define different types of linq?

1 Answers  


Why do we use linq in c#?

1 Answers  


What is the advantage of linq in c#?

1 Answers  


How can you find average of student marks from student tables (columns are studentid, marks)?

1 Answers  


What do you understand by datacontext class? How is it related to linq?

1 Answers  


Explain Union, Intersect and Except?

1 Answers  


Can we use linq with ado net?

1 Answers  


What is linqkit?

1 Answers  


When to use Single, SingleOrDefault, First and FirstOrDefault?

1 Answers  


How LINQ query is compiled to Expression Trees?

1 Answers  


Describe the architecture of linq?

1 Answers  


How is datacontext class related to linq?

1 Answers  


Categories