TabletDeviceCollection.CopyTo(TabletDevice[], Int32) Méthode

Définition

Copie tous les éléments de la collection active dans le tableau unidimensionnel spécifié, en commençant à l’index de tableau de destination spécifié.

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

Paramètres

array
TabletDevice[]

Tableau unidimensionnel qui est la destination des éléments copiés à partir de la collection. Le tableau doit avoir une indexation de base zéro.

index
Int32

Index de base zéro dans le paramètre de tableau où la copie commence.

Exceptions

Si index + nombre de collections est supérieur ou égal à array.length.

Si array c’est null.

S’il index est inférieur à 0 ou index supérieur ou égal à array.length.

Exemples

L’exemple suivant illustre la CopyTo méthode.

// Copy the collection to array of tablet devices starting at position index
myTabletDeviceCollection.CopyTo(myTabletDeviceArray, index);
' Copy the collection to array of tablet devices starting at position index
myTabletDeviceCollection.CopyTo(myTabletDeviceArray, index)

S’applique à