OptionExtensionsLinqLastOrNoneT(IEnumerableT) Method
Returns Some of the last element of the
collection if it is non-empty; None otherwise.
Assert(Array.Empty<Title>().FirstOrNone().IsNone);
Assert((new int[2] { 1, 2 }).LastOrNone() == Some(2));
Namespace: Orx.Fun.OptionAssembly: Orx.Fun.Option (in Orx.Fun.Option.dll) Version: 1.2.1+ea79806fa5e0e04bfdaef2a1916930e75e2cde74
public static Opt<T> LastOrNone<T>(
this IEnumerable<T> collection
)
- collection IEnumerableT
- Collection.
- T
[Missing <typeparam name="T"/> documentation for "M:Orx.Fun.Option.OptionExtensionsLinq.LastOrNone``1(System.Collections.Generic.IEnumerable{``0})"]
OptTIn Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).