Table of Contents

Struct SingleOrDefaultNullableStruct<T>

Namespace
Rinku
Assembly
Rinku.dll

Reads zero or one value type result while accepting a NULL value. A missing row and a NULL value both give an empty value. A second result throws.

public readonly struct SingleOrDefaultNullableStruct<T> : IWrapping<SingleOrDefaultNullableStruct<T>, T?> where T : struct

Type Parameters

T
Implements
Inherited Members
Extension Methods

Constructors

SingleOrDefaultNullableStruct(T?)

Reads zero or one value type result while accepting a NULL value. A missing row and a NULL value both give an empty value. A second result throws.

public SingleOrDefaultNullableStruct(T? value)

Parameters

value T?

Fields

Value

The value, or empty when there was no row or its value was null.

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 SingleOrDefaultNullableStruct<T> Make(T? val)

Parameters

val T?

Returns

SingleOrDefaultNullableStruct<T>

Operators

implicit operator T?(SingleOrDefaultNullableStruct<T>)

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

Parameters

val SingleOrDefaultNullableStruct<T>

Returns

T?

implicit operator SingleOrDefaultNullableStruct<T>(T?)

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

Parameters

val T?

Returns

SingleOrDefaultNullableStruct<T>