OptionalValueT Structure |
Namespace: Deedle
The OptionalValueT type exposes the following members.
Name | Description | |
---|---|---|
OptionalValueT |
Creates a new instance of `OptionalValue<T>` that contains
the specified `T` value .
|
Name | Description | |
---|---|---|
HasValue |
Gets a value indicating whether the current `OptionalValue<T>` has a value
| |
Missing |
Returns a new instance of `OptionalValue<T>` that does not contain a value.
| |
Value |
Returns the value stored in the current `OptionalValue<T>`.
Exceptions:
`InvalidOperationException` - Thrown when `HasValue` is `false`.
| |
ValueOrDefault |
Returns the value stored in the current `OptionalValue<T>` or
the default value of the type `T` when a value is not present.
|
Name | Description | |
---|---|---|
Equals |
Support structural equality
(Overrides ValueTypeEquals(Object).) | |
GetHashCode |
Support structural equality
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString |
Prints the value or "<null>" when the value is present, but is `null`
or "<missing>" when the value is not present (`HasValue = false`).
(Overrides ValueTypeToString.) |
Name | Description | |
---|---|---|
AsNullableT |
Extension method that converts optional value containing a value type
to a C# friendly `Nullable<T>` or `T?` type.
(Defined by OptionalValueExtensions.) | |
OrDefaultT |
Extension method that returns value in the specified optional value
or the provided default value (the second argument).
(Defined by OptionalValueExtensions.) |