Deedle


OptionalValue<'T>

Namespace: Deedle
Attributes:
[<Struct>]
[<CustomEquality>]
[<NoComparison>]

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

ConstructorDescription
new(value)
Signature: value:'T -> OptionalValue<'T>

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

CompiledName: .ctor

Instance members

Instance memberDescription
x.HasValue
Signature: bool

Gets a value indicating whether the current OptionalValue<T> has a value

CompiledName: get_HasValue

x.Value
Signature: 'T

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

CompiledName: get_Value

x.ValueOrDefault
Signature: 'T

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

CompiledName: get_ValueOrDefault

Static members

Static memberDescription
OptionalValue.Missing
Signature: OptionalValue<'T>

Returns a new instance of OptionalValue<T> that does not contain a value.

CompiledName: get_Missing

Fork me on GitHub