Vidyalelo
C# Programming · Q36

LINQ (Language

Programming · C# Programming · question 36

Q36

In LINQ, what does the SingleOrDefault operator do?

A.
Returns the first element of a sequence that satisfies a condition
B.
Returns the last element of a sequence that satisfies a condition
C.
Returns the number of elements in a sequence
D.
Returns the only element of a sequence that satisfies a condition, or a default value if no such element is found
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board