ResTUnwrap Method

Returns the underlying value when IsOk; or throws when IsErr. Must be called shyly, as it is not necessary to unwrap until the final result is achieved due to Map, FlatMap and TryMap methods.
C#
Res<int> resultAge = "42".ParseIntOrErr();
if (resultAge.IsSome) {
    int age = resultAge.Unwrap(); // use the uwrapped age
} else { // handle the Err case
}

Definition

Namespace: Orx.Fun.Result
Assembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
C#
public T Unwrap()

Return Value

T

See Also