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
x.Exception
Signature: exn

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

CompiledName: get_Exception

x.HasValue
Signature: bool

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

CompiledName: get_HasValue

x.Value
Signature: 'T

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

CompiledName: get_Value

Fork me on GitHub