ReadOnlySpan<T>.GetPinnableReference Method

Definition

A read-only reference to an object of type T that can be used for pinning, and is required to support the use of span within a fixed statement.

public:
 T& ^ GetPinnableReference();
public ref readonly T GetPinnableReference ();
member this.GetPinnableReference : unit -> 'T
Public Function GetPinnableReference () As T

Returns

T

A reference to the element of the span at index 0, or null if the span is empty.

Applies to