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
valueT?
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
Methods
Make(T?)
Creates the wrapper from a value returned by a query.
public static SingleOrDefaultNullableStruct<T> Make(T? val)
Parameters
valT?
Returns
Operators
implicit operator T?(SingleOrDefaultNullableStruct<T>)
public static implicit operator T?(SingleOrDefaultNullableStruct<T> val)
Parameters
Returns
- T?
implicit operator SingleOrDefaultNullableStruct<T>(T?)
public static implicit operator SingleOrDefaultNullableStruct<T>(T? val)
Parameters
valT?