Table of Contents

Method GetReference

Namespace
Zyl.VectorTraits.Impl.Util
Assembly
VectorTraits.dll

GetReference<T>(ReadOnlySpan<T>)

Returns a reference to the element of the read-only span at index 0 (返回只读跨度在索引0处的引用).

public static ref T GetReference<T>(ReadOnlySpan<T> span)

Parameters

span ReadOnlySpan<T>

The read-only span from which the reference is retrieved (用于检索引用的只读跨度).

Returns

T

A reference to the element at index 0 (对索引为 0 处元素的引用).

Type Parameters

T

The type of items in the span (跨度中的元素的类型).

See Also

GetReference<T>(Span<T>)

Returns a reference to the element of the span at index 0 (返回跨度在索引0处的引用).

public static ref T GetReference<T>(Span<T> span)

Parameters

span Span<T>

The span from which the reference is retrieved(用于检索引用的跨度).

Returns

T

A reference to the element at index 0 (对索引为 0 处元素的引用).

Type Parameters

T

The type of items in the span (跨度中的元素的类型).

See Also