Edytuj

Udostępnij za pośrednictwem


NullableRef<T> Struct

Definition

A struct that can store an optional reference to a value of a specified type.

public readonly ref struct NullableRef<T>
type NullableRef<'T> = struct
Public Structure NullableRef(Of T)

Type Parameters

T

The type of value to reference.

Inheritance
NullableRef<T>

Constructors

NullableRef<T>(T)

Initializes a new instance of the NullableRef<T> struct.

Properties

HasValue

Gets a value indicating whether or not the current NullableRef<T> instance wraps a valid reference that can be accessed.

Null

Gets a NullableRef<T> instance representing a null reference.

Value

Gets the T reference represented by the current NullableRef<T> instance.

Operators

Explicit(NullableRef<T> to T)

Explicitly gets the T value from a given NullableRef<T> instance.

Implicit(Ref<T> to NullableRef<T>)

Applies to