CodeTypeReferenceCollection.CopyTo(CodeTypeReference[], Int32) Méthode

Définition

Copie les éléments de la collection vers le Array à une dimension spécifiée, à l'index déterminé.

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

Paramètres

array
CodeTypeReference[]

Array unidimensionnel qui représente la destination des valeurs copiées à partir de la collection.

index
Int32

Index du tableau à partir duquel commencer l'insertion.

Exceptions

Le paramètre array est multidimensionnel.

- ou -

Le nombre d'éléments dans le CodeTypeReferenceCollection est supérieur à l'espace disponible entre l'index du tableau cible spécifié par le paramètre index et la fin du tableau cible.

Le paramètre array a la valeur null.

Le paramètre index est inférieur à l'index minimal du tableau cible.

Exemples

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

S’applique à

Voir aussi