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 First() and Single() extension methods in LINQ?



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

Answer / Arvind Verma

First() returns the first element from a sequence or an enumerable object, while Single() also retrieves the first element but throws an exception if there are multiple elements or no elements at all. In other words, First() has a potential to return more than one result if multiple elements exist in the sequence.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More LINQ Language-Integrated Query Interview Questions

Write a program using skip and take operators. How can it beneficial for bulky data accessing on page?

1 Answers  


What is defaultifempty in linq?

1 Answers  


Why from comes first in linq?

1 Answers  


What is the difference between the Take and Skip clauses?

1 Answers  


Which one is fast between SingleOrDefault and FirstOrDefault?

1 Answers  


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

1 Answers  


What is select new linq?

1 Answers  


What is the query syntax?

1 Answers  


Explain what is the purpose of linq providers in linq?

1 Answers  


Is linq better than stored procedure?

1 Answers  


Is linq a framework?

1 Answers  


What is difference between LINQ and Stored Procedures?

1 Answers  


Categories