NullableExtensions.DangerousGetValueOrNullReference<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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).