Table of Contents

Method ToNullable

Namespace
SodaFlow.Functional
Assembly
SodaFlow.Functional.dll

ToNullable<T>(Maybe<T>)

Changes a Maybe<T> of a value type into a Nullable<T>.

[Pure]
public static T? ToNullable<T>(this Maybe<T> a) where T : struct

Parameters

a Maybe<T>

The value to change.

Returns

T?

A Nullable<T> holding the contained value if there is one, and null otherwise.

Type Parameters

T

The type of the value, when there is one.

Remarks

For handing a value to an API which speaks in nullables. SomeNotNull<T>(T?) changes back.