Header menu logo Deedle

TryValue<'T> Type

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 case Description

Error exn

Full Usage: Error exn

Parameters:
    Item : exn

Item : exn

Success 'T

Full Usage: Success 'T

Parameters:
    Item : 'T

Item : 'T

Instance members

Instance member Description

this.Exception

Full Usage: this.Exception

Returns: exn

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

Returns: exn

this.HasValue

Full Usage: this.HasValue

Returns: bool

Returns `true` when the `TryValue` object represents a successfully calculated value

Returns: bool

this.IsError

Full Usage: this.IsError

Returns: bool
Returns: bool

this.IsSuccess

Full Usage: this.IsSuccess

Returns: bool
Returns: bool

this.Value

Full Usage: this.Value

Returns: 'T

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

Returns: 'T

Type something to start searching.