Header menu logo Deedle

OptionalValue<'T> Type

Value type that represents a potentially missing value. This is similar to System.Nullable<T>, but does not restrict the contained value to be a value type, so it can be used for storing values of any types. When obtained from DataFrame<R, C> or Series<K, T>, the Value will never be Double.NaN or null (but this is not, in general, checked when constructing the value). The type is only used in C#-friendly API. F# operations generally use expose standard F# option<T> type instead. However, there the OptionalValue module contains helper functions for using this type from F# as well as Missing and Present active patterns.

Constructors

Constructor Description

OptionalValue(value)

Full Usage: OptionalValue(value)

Parameters:
    value : 'T

Returns: OptionalValue<'T>

Creates a new instance of `OptionalValue` that contains the specified `T` value .

value : 'T
Returns: OptionalValue<'T>

Instance members

Instance member Description

this.HasValue

Full Usage: this.HasValue

Returns: bool

Gets a value indicating whether the current `OptionalValue` has a value

Returns: bool

this.Value

Full Usage: this.Value

Returns: 'T
 Returns the value stored in the current `OptionalValue`.
 Exceptions:
   `InvalidOperationException` - Thrown when `HasValue` is `false`.
Returns: 'T

this.ValueOrDefault

Full Usage: this.ValueOrDefault

Returns: 'T

Returns the value stored in the current `OptionalValue` or the default value of the type `T` when a value is not present.

Returns: 'T

Static members

Static member Description

OptionalValue.Missing

Full Usage: OptionalValue.Missing

Returns: OptionalValue<'T>

Returns a new instance of `OptionalValue` that does not contain a value.

Returns: OptionalValue<'T>

Type something to start searching.