You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.
Syntax
LastOrDefault([predicate])
Parameters
predicate
A function to test each element for a condition: Boolean predicate(TSource)
Return Value
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.