Deedle


TryValue<'T>

Namespace: Deedle

Represents a value or an exception. This type is used by functions such as Series.tryMap and Frame.tryMap to capture the result of a lambda function, which may be either a value or an exception. The type is a discriminated union, so it can be processed using F# pattern matching, or using Value, HasValue and Exception properties

Union Cases

Union CaseDescription
Error(exn)
Signature: exn
Success('T)
Signature: 'T

Instance members

Instance memberDescription
Exception
Signature: exn

Returns the exception captured by this value. When HasValue = true, accessing the property throws InvalidOperationException.

HasValue
Signature: bool

Returns true when the TryValue<T> object represents a successfully calculated value

Value
Signature: 'T

Returns the value of TryValue<T> when the value is present; otherwise, throws an exception that was captured

Fork me on GitHub