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 single and first in linq?



What is the difference between single and first in linq?..

Answer / Santosh Kumar Shukla

In LINQ, Single() returns the first element that matches the query, or throws an exception if there are no elements matching the query. First(), on the other hand, returns the first element or a default value (null for reference types, Default for nullable value types) if no elements match.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More LINQ Language-Integrated Query Interview Questions

What are linq extension methods?

1 Answers  


Which is faster linq or lambda?

1 Answers  


Where in linq query with multiple conditions?

1 Answers  


What is the difference between First() and Single() extension methods in LINQ?

1 Answers   TryTechnicals Pvt Ltd,


Define api in linq?

1 Answers  


What is difference between single and singleordefault in linq?

1 Answers  


What is deferred execution in linq?

1 Answers  


What is meant by linq in c#?

1 Answers  


What is the difference between LINQ and Lambda Expression?

1 Answers   Petranics Solutions,


What is the difference between N-layer and N-tier architecture?

1 Answers  


Define what is Where clause and Let clause?

1 Answers  


What is linq in sql?

1 Answers  


Categories