Compartir a través de


CodeAttributeArgumentCollection.CopyTo(CodeAttributeArgument[], Int32) Método

Definición

Copia los objetos de colección en una instancia Array unidimensional, comenzando a partir del índice especificado.

public:
 void CopyTo(cli::array <System::CodeDom::CodeAttributeArgument ^> ^ array, int index);
public void CopyTo (System.CodeDom.CodeAttributeArgument[] array, int index);
member this.CopyTo : System.CodeDom.CodeAttributeArgument[] * int -> unit
Public Sub CopyTo (array As CodeAttributeArgument(), index As Integer)

Parámetros

array
CodeAttributeArgument[]

Array unidimensional que constituye el destino de los valores copiados de la colección.

index
Int32

Índice de la matriz donde debe comenzar la inserción.

Excepciones

La matriz de destino es multidimensional.

o bien

El número de elementos de la clase CodeAttributeArgumentCollection es mayor que el espacio disponible entre el índice de la matriz de destino especificada por el parámetro index y el final de la matriz de destino.

El parámetro array es null.

El parámetro index es menor que el índice mínimo de la matriz de destino.

Ejemplos

En el ejemplo siguiente se muestra cómo copiar el contenido de un CodeAttributeArgumentCollection objeto en una CodeAttributeArgument matriz que comienza en un valor de índice especificado.

// Copies the contents of the collection beginning at index 0,
// to the specified CodeAttributeArgument array.
// 'arguments' is a CodeAttributeArgument array.
collection->CopyTo( arguments, 0 );
// Copies the contents of the collection beginning at index 0,
// to the specified CodeAttributeArgument array.
// 'arguments' is a CodeAttributeArgument array.
collection.CopyTo( arguments, 0 );
' Copies the contents of the collection beginning at index 0,
' to the specified CodeAttributeArgument array.
' 'arguments' is a CodeAttributeArgument array.
collection.CopyTo(arguments, 0)

Se aplica a