What is difference between single and singleordefault in linq?
Answer Posted / Vivek Kumar
Single returns the first element in an enumerable that matches a specified condition, throwing an exception if multiple matching elements are found. SingleOrDefault returns the first matching element or a default value (null for reference types) if no matching element is found.
| 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