Vector2.CopyTo Metodo
Definizione
Copia gli elementi del vettore in una matrice.Copies the elements of the vector to an array.
Overload
CopyTo(Single[]) |
Copia gli elementi del vettore nella matrice specificata.Copies the elements of the vector to a specified array. |
CopyTo(Single[], Int32) |
Copia gli elementi del vettore nella matrice specificata, partendo dalla posizione dell'indice specificata.Copies the elements of the vector to a specified array starting at a specified index position. |
CopyTo(Single[])
Copia gli elementi del vettore nella matrice specificata.Copies the elements of the vector to a specified array.
public:
void CopyTo(cli::array <float> ^ array);
public void CopyTo (float[] array);
member this.CopyTo : single[] -> unit
Public Sub CopyTo (array As Single())
Parametri
- array
- Single[]
Matrice di destinazione.The destination array.
Eccezioni
array
è null
.array
is null
.
Il numero di elementi nell'istanza corrente è maggiore di quello nella matrice.The number of elements in the current instance is greater than in the array.
array
è multidimensionale.array
is multidimensional.
Commenti
array
deve contenere almeno due elementi.array
must have at least two elements. Il metodo copia gli elementi del vettore a partire dall'indice 0.The method copies the vector's elements starting at index 0.
Si applica a
CopyTo(Single[], Int32)
Copia gli elementi del vettore nella matrice specificata, partendo dalla posizione dell'indice specificata.Copies the elements of the vector to a specified array starting at a specified index position.
public:
void CopyTo(cli::array <float> ^ array, int index);
public void CopyTo (float[] array, int index);
member this.CopyTo : single[] * int -> unit
Public Sub CopyTo (array As Single(), index As Integer)
Parametri
- array
- Single[]
Matrice di destinazione.The destination array.
- index
- Int32
Indice in cui copiare il primo elemento del vettore.The index at which to copy the first element of the vector.
Eccezioni
array
è null
.array
is null
.
Il numero di elementi nell'istanza corrente è maggiore di quello nella matrice.The number of elements in the current instance is greater than in the array.
index
è minore di zero.index
is less than zero.
-oppure--or-
index
è maggiore o uguale alla lunghezza della matrice.index
is greater than or equal to the array length.
array
è multidimensionale.array
is multidimensional.
Commenti
array
deve avere un numero sufficiente di elementi per contenere i due elementi vettoriali.array
must have a sufficient number of elements to accommodate the two vector elements. In altre parole, gli elementi index
e index
+ 1 devono essere già presenti in array
.In other words, elements index
and index
+ 1 must already exist in array
.