Table of Contents

Struct OptionalNullable<T>

Namespace
Rinku
Assembly
Rinku.dll

Reads one reference value while accepting a missing row or a NULL value. Both cases set HasValue to false.

public readonly struct OptionalNullable<T> : IWrapping<OptionalNullable<T>, T> where T : class

Type Parameters

T
Implements
Inherited Members
Extension Methods

Constructors

OptionalNullable(T)

Reads one reference value while accepting a missing row or a NULL value. Both cases set HasValue to false.

public OptionalNullable(T value)

Parameters

value T

Fields

Value

The value, or null when the row was missing or its value was null.

[MaybeNull]
public readonly T? Value

Field Value

T

Properties

HasValue

Whether a non-null value was read.

public bool HasValue { get; }

Property Value

bool

Methods

Make(T)

Creates the wrapper from a value returned by a query.

public static OptionalNullable<T> Make(T val)

Parameters

val T

Returns

OptionalNullable<T>

Operators

implicit operator T?(OptionalNullable<T>)

public static implicit operator T?(OptionalNullable<T> val)

Parameters

val OptionalNullable<T>

Returns

T

implicit operator OptionalNullable<T>(T?)

public static implicit operator OptionalNullable<T>(T? val)

Parameters

val T

Returns

OptionalNullable<T>