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

How to write not in query in linq?

1 Answers  


What is linq in c #?

1 Answers  


What is difference between into and let keyword in LINQ?

1 Answers  


Can we use left join in linq?

1 Answers  


What is the difference between single and first in linq?

1 Answers  


Why cant datareader be returned from a web services method?

1 Answers  


What is the use of linq in c#?

1 Answers  


What is linq expression?

1 Answers  


what is LINQ? Why is it required?

1 Answers  


what is lambda expressions in LINQ?

1 Answers  


Explain linq to xml?

1 Answers  


How does linq to sql work?

1 Answers  


Categories