What is the difference between First() and Single() extension methods in LINQ?
Answer Posted / 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 View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category