TEnumerableBase<T>.LastOrDefault Method
Returns the last element of a sequence, or a default value if the sequence contains no elements.
public
function LastOrDefault: T; overload;
Return Value
Type: T
Default(T) if the source sequence is empty; otherwise, the last element in the IEnumerable<T>.