GC.AllocateArray<T>(Int32, Boolean) Método

Definição

Aloca uma matriz.

public static T[] AllocateArray<T> (int length, bool pinned = false);
static member AllocateArray : int * bool -> 'T[]
Public Shared Function AllocateArray(Of T) (length As Integer, Optional pinned As Boolean = false) As T()

Parâmetros de tipo

T

Especifica o tipo do elemento de matriz.

Parâmetros

length
Int32

Especifica o comprimento da matriz.

pinned
Boolean

Especifica se a matriz alocada deve ser fixada.

Retornos

T[]

Um objeto de matriz.

Comentários

Se fixado estiver definido como true, T não deve ser um tipo de referência ou um tipo que contenha referências de objeto.

Aplica-se a