Method ValueOrDefault
- Namespace
- SodaFlow.Functional
- Assembly
- SodaFlow.Functional.dll
ValueOrDefault<T>(Maybe<T>)
Returns the contained value if there is one, and the default for its type otherwise.
[Pure]
public static T? ValueOrDefault<T>(this Maybe<T> a)
Parameters
aMaybe<T>The value to read.
Returns
- T
The contained value, or default if there is none.
Type Parameters
TThe type of the value.