SpanExtensions.DangerousGetReferenceAt<T>(Span<T>, Int32) 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 an element at a specified index within a given Span<T>, with no bounds checks.
public static ref T DangerousGetReferenceAt<T> (this Span<T> span, int i);
static member DangerousGetReferenceAt : Span<'T> * int -> 'T
<Extension()>
Public Function DangerousGetReferenceAt(Of T) (span As Span(Of T), i As Integer) As T
Type Parameters
- T
The type of elements in the input Span<T> instance.
Parameters
- i
- Int32
The index of the element to retrieve within span
.
Returns
A reference to the element within span
at the index specified by i
.
Remarks
This method doesn't do any bounds checks, therefore it is responsibility of the caller to ensure the i
parameter is valid.