-
Notifications
You must be signed in to change notification settings - Fork 26
LastOrDefault
Eugene Sadovoi edited this page Jul 7, 2016
·
1 revision
Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.
LastOrDefault([predicate])
A function to test each element for a condition: Boolean predicate(TSource)
default(TSource) if the sequence is empty or if no elements pass the test in the predicate function; otherwise, the last element that passes the test in the predicate function.