Table of Contents

Struct OptionalStruct<T>

Namespace
Rinku
Assembly
Rinku.dll

Reads one value type or reports that no row was returned.

public readonly struct OptionalStruct<T> : IWrapping<OptionalStruct<T>, T> where T : struct

Type Parameters

T
Implements
Inherited Members
Extension Methods

Constructors

OptionalStruct(T)

Reads one value type or reports that no row was returned.

public OptionalStruct(T value)

Parameters

value T

Fields

Value

The value, or empty when there was no row.

[MaybeNull]
public readonly T? Value

Field Value

T?

Properties

HasValue

Whether a row was read.

public bool HasValue { get; }

Property Value

bool

Methods

Make(T)

Creates the wrapper from a value returned by a query.

public static OptionalStruct<T> Make(T val)

Parameters

val T

Returns

OptionalStruct<T>

Operators

implicit operator T?(OptionalStruct<T>)

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

Parameters

val OptionalStruct<T>

Returns

T?

implicit operator OptionalStruct<T>(T?)

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

Parameters

val T?

Returns

OptionalStruct<T>