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

Explain how LINQ is useful than Stored Procedures?

1 Answers  


How to write not in query in linq?

1 Answers  


What is linq to object?

1 Answers  


Which assembly represents the core LINQ API?

1 Answers  


What is LINQ provider and what are different types of LINQ providers?

1 Answers  


Write the basic syntax of a LINQ query in Visual Basic as well as in C#.

1 Answers  


List out the main components of linq? Tell what is the extension of the file, when linq to sql is used?

1 Answers  


Can we use LINQ with databases other than SQL Server

1 Answers   Sans Pareil IT Services,


Is not supported in linq to entities?

1 Answers  


What do you understand by linq? Enlist its types.

1 Answers  


What does a linq query return?

1 Answers  


What is linq expression?

1 Answers  


Categories