Editar

Compartilhar via


NullableReadOnlyRef<T> Struct

Definition

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

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

Type Parameters

T

The type of value to reference.

Inheritance
NullableReadOnlyRef<T>

Constructors

NullableReadOnlyRef<T>(T)

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

Properties

HasValue

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

Null

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

Value

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

Operators

Explicit(NullableReadOnlyRef<T> to T)

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

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

Applies to