CodeCommentStatementCollection.CopyTo(CodeCommentStatement[], Int32) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Copie les objets de collection dans le début unidimensionnel Array spécifié à l’index spécifié.
public:
void CopyTo(cli::array <System::CodeDom::CodeCommentStatement ^> ^ array, int index);
public void CopyTo(System.CodeDom.CodeCommentStatement[] array, int index);
member this.CopyTo : System.CodeDom.CodeCommentStatement[] * int -> unit
Public Sub CopyTo (array As CodeCommentStatement(), index As Integer)
Paramètres
- array
- CodeCommentStatement[]
Unidimensionnel Array qui est la destination des valeurs copiées à partir de la collection.
- index
- Int32
Index du tableau auquel commencer l’insertion.
Exceptions
Le tableau de destination est multidimensionnel.
- ou -
Le nombre d’éléments dans le tableau CodeCommentStatementCollection cible est supérieur à l’espace disponible entre l’index du tableau cible spécifié par le index paramètre et la fin du tableau cible.
Le array paramètre est null.
Le index paramètre est inférieur à l’index minimal du tableau cible.
Exemples
L’exemple suivant montre comment copier le contenu d’un CodeCommentStatementCollection tableau à partir de la valeur d’index 0.
// Copies the contents of the collection, beginning at index 0,
// to the specified CodeCommentStatement array.
// 'comments' is a CodeCommentStatement array.
collection.CopyTo( comments, 0 );
' Copies the contents of the collection beginning at index 0 to the specified CodeCommentStatement array.
' 'comments' is a CodeCommentStatement array.
collection.CopyTo(comments, 0)