Edit

Share via


NullableExtensions.DangerousGetValueOrNullReference<T> Method

Definition

Returns a reference to the value of the input Nullable<T> instance, or a nullT reference.

public static ref T DangerousGetValueOrNullReference<T>(this ref T? value) where T : struct;
static member DangerousGetValueOrNullReference : Nullable -> 'T (requires 'T : struct)
<Extension()>
Public Function DangerousGetValueOrNullReference(Of T As Structure) (ByRef value As Nullable(Of T)) As T

Type Parameters

T

The type of the underlying value.

Parameters

value
Nullable<T>

The Nullable<T>.

Returns

T

A reference to the value of the input Nullable<T> instance, or a nullT reference.

Remarks

The returned reference can be tested for null using IsNullRef<T>(T).

Applies to