Modifier

Partager via


ArrayExtensions.DangerousGetReference Method

Definition

Overloads

DangerousGetReference<T>(T[,,])

Returns a reference to the first element within a given 3D T array, with no bounds checks.

DangerousGetReference<T>(T[,])

Returns a reference to the first element within a given 2D T array, with no bounds checks.

DangerousGetReference<T>(T[])

Returns a reference to the first element within a given T array, with no bounds checks.

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

T

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

T

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

T

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