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 firstordefault () select methods in linq?



What is the difference between first () and firstordefault () select methods in linq?..

Answer / Seema Rani

"first()" returns an exception if no elements are found, while "firstordefault()" returns a default value of the element type when no elements are found.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More LINQ Language-Integrated Query Interview Questions

What is linq in xamarin?

1 Answers  


What do you understand by datacontext class?

1 Answers  


What is difference between XElement.Load() and XDocument.Load()?

1 Answers  


In LINQ how will you find the index of the element using where () with Lambda Expressions?

1 Answers  


How you can assign a lambda expression to a delegate?

1 Answers  


What is first in linq?

1 Answers  


How can you find average of student marks from student tables (columns are studentid, marks)?

1 Answers  


What is deferred execution in linq?

1 Answers  


What is the difference between first () and firstordefault () select methods in linq?

1 Answers  


Why is linq used?

1 Answers  


How linq is useful than stored procedures?

1 Answers  


What is the difference between linq to sql and entity framework?

1 Answers  


Categories