Examveda

In LINQ, what does the LastOrDefault operator do?

A. Returns the first element of a sequence that satisfies a condition

B. Returns the only element of a sequence that satisfies a condition, or a default value if no such element is found

C. Returns the last element of a sequence that satisfies a condition, or a default value if no such element is found

D. Returns the number of elements in a sequence

Answer: Option C


Join The Discussion

Related Questions on LINQ (Language Integrated Query) in C Sharp