CodeAttributeArgumentCollection.CopyTo(CodeAttributeArgument[], Int32) Metoda

Definice

Zkopíruje objekty kolekce do jednorozměrné Array instance počínaje zadaným indexem.

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)

Parametry

array
CodeAttributeArgument[]

Jednorozměrný Array , který je cílem hodnot zkopírovaných z kolekce.

index
Int32

Index pole, ve kterém se má začít vkládat.

Výjimky

Cílové pole je multidimenzionální.

-nebo-

Počet prvků v objektu CodeAttributeArgumentCollection je větší než dostupná mezera mezi indexem cílového pole určeným parametrem index a koncem cílového pole.

Parametr array je null.

Parametr index je menší než minimální index cílového pole.

Příklady

Následující příklad ukazuje, jak zkopírovat obsah objektu CodeAttributeArgumentCollection do CodeAttributeArgument pole začínající na zadané hodnotě indexu.

// 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)

Platí pro