CodeAttributeArgumentCollection.CopyTo(CodeAttributeArgument[], Int32) Metoda

Definice

Zkopíruje objekty kolekce do jednorozměrné Array instance začínající 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 cíl hodnot zkopírovaných z kolekce.

index
Int32

Index pole, na který chcete začít vkládat.

Výjimky

Cílové pole je multidimenzionální.

nebo

Počet prvků v objektu CodeAttributeArgumentCollection je větší než dostupný prostor mezi indexem cílového pole určeného 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 pole začínající CodeAttributeArgument na zadanou hodnotu 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)

Platí pro