Table of Contents

TryUnwrap Method

Definition

Namespace
Tyne
Assembly
Tyne.Core.dll

Methods

| Edit this page View Source

TryUnwrap(out T?, out TE?)

Tries to unwrap this result.

Declaration
[Pure]
public bool TryUnwrap(out T? ok, out TE? error)
Parameters
ok
T

This result's Ok value if it is Ok(T); otherwise, default when it is Error(TE).

error
TE

This result's Error value if it is Error(TE); otherwise, default when it is Ok(T).

Returns
bool

true if this is Ok(T); otherwise, false when it is Error(TE).

Remarks

If this is Ok(T), then ok is set and this returns true. Otherwise, when this is Error(TE), then error will be set and this returns false.