SpanExtensions.DangerousGetReference<T>(Span<T>) 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 the first element within a given Span<T>, with no bounds checks.
public static ref T DangerousGetReference<T> (this Span<T> span);
static member DangerousGetReference : Span<'T> -> 'T
<Extension()>
Public Function DangerousGetReference(Of T) (span As Span(Of T)) As T
Type Parameters
- T
The type of elements in the input Span<T> instance.
Parameters
Returns
T
A reference to the first element within span
.
Remarks
This method doesn't do any bounds checks, therefore it is responsibility of the caller to perform checks in case the returned value is dereferenced.