ResultExtensionsLinqLastOkT Method
Returns Some of the value of last Ok result of the
collection if any; None otherwise.
var results = new Res<int>[3] { Err<int>("err"), Ok(42), Ok(7) };
Assert.Equal(Some(7), results.LastOk());
results = new Res<int>[1] { Err<int>("err") };
Assert.True(results.LastOk().IsNone);
Namespace: Orx.Fun.ResultAssembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
public static Opt<T> LastOk<T>(
this IEnumerable<Res<T>> collection
)
- collection IEnumerableResT
- Collection.
- T
[Missing <typeparam name="T"/> documentation for "M:Orx.Fun.Result.ResultExtensionsLinq.LastOk``1(System.Collections.Generic.IEnumerable{Orx.Fun.Result.Res{``0}})"]
OptTIn Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableResT. 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).