System.Collections.Generic.IEnumerable.LastOrNone()

Here are the examples of the csharp api System.Collections.Generic.IEnumerable.LastOrNone() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : Enumerable.cs
with Apache License 2.0
from atifaziz

public static (bool HasValue, T Value)
            LastOrNone<T>(this IEnumerable<T> source,
                         Func<T, bool> predicate) =>
            source.Where(predicate).LastOrNone();

19 Source : EnumerableExtensions.cs
with MIT License
from fuse-open

public static T LastOr<T>(this IEnumerable<T> self, T element)
		{
			return self.LastOrNone().Or(element);
		}