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...


What is the difference between FirstOrDefault() and SingleOrDefault() extension method in LINQ ?



What is the difference between FirstOrDefault() and SingleOrDefault() extension method in LINQ ?..

Answer / Akhil Tripathi

FirstOrDefault() returns null if no elements are found, whereas SingleOrDefault() throws an exception if more than one element is found. In other words, FirstOrDefault() does not guarantee that only one result will be returned, while SingleOrDefault() ensures it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More LINQ Language-Integrated Query Interview Questions

What does a linq query return?

1 Answers  


What is linq query in c#?

1 Answers  


What is "linq to objects"?

1 Answers  


Explain what is the difference between skip() and skipwhile() extension method?

1 Answers  


Why can not datareader by returned from a web services method?

1 Answers  


Can you disable lazy/deferred loading?

1 Answers  


Explain how standard query operators useful in LINQ?

1 Answers  


How you can assign a lambda expression to a delegate?

1 Answers  


Why cant datareader be returned from a web services method?

1 Answers  


How you can retrieve a single row with linq?

1 Answers  


What LINQ providers are supported by LINQPad?

1 Answers  


What are the different implementations of LINQ?

1 Answers  


Categories