ArrayExtensions.DangerousGetReference 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.
Overloads
DangerousGetReference<T>(T[,,]) |
Returns a reference to the first element within a given 3D |
DangerousGetReference<T>(T[,]) |
Returns a reference to the first element within a given 2D |
DangerousGetReference<T>(T[]) |
Returns a reference to the first element within a given |
DangerousGetReference<T>(T[,,])
Returns a reference to the first element within a given 3D T
array, with no bounds checks.
public static ref T DangerousGetReference<T> (this T[,,] array);
static member DangerousGetReference : 'T[,,] -> 'T
<Extension()>
Public Function DangerousGetReference(Of T) (array As T(,,)) As T
Type Parameters
- T
The type of elements in the input 3D T
array instance.
Parameters
- array
- T[,,]
The input T
array instance.
Returns
A reference to the first element within array
, or the location it would have used, if array
is empty.
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.
Applies to
DangerousGetReference<T>(T[,])
Returns a reference to the first element within a given 2D T
array, with no bounds checks.
public static ref T DangerousGetReference<T> (this T[,] array);
static member DangerousGetReference : 'T[,] -> 'T
<Extension()>
Public Function DangerousGetReference(Of T) (array As T(,)) As T
Type Parameters
- T
The type of elements in the input 2D T
array instance.
Parameters
- array
- T[,]
The input T
array instance.
Returns
A reference to the first element within array
, or the location it would have used, if array
is empty.
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.
Applies to
DangerousGetReference<T>(T[])
Returns a reference to the first element within a given T
array, with no bounds checks.
public static ref T DangerousGetReference<T> (this T[] array);
static member DangerousGetReference : 'T[] -> 'T
<Extension()>
Public Function DangerousGetReference(Of T) (array As T()) As T
Type Parameters
- T
The type of elements in the input T
array instance.
Parameters
- array
- T[]
The input T
array instance.
Returns
A reference to the first element within array
, or the location it would have used, if array
is empty.
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.