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 |
Can we use LINQ with databases other than SQL Server
1 Answers Sans Pareil IT Services,
Explain linq to sql?
Why is linq used?
What are the Quantifiers in LINQ?
1 Answers Sans Pareil IT Services,
Explain how standard query operators useful in LINQ?
What is LINQPad?
What are different methods to write LINQ Query?
Differentiate between select() and selectmany() method in linq.
What is linq in c# and its advantages?
Write a program using linq to find the sum of first 5 prime numbers?
Explain why select clause comes after from clause in linq?
Is linq a framework?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)