Vector4.CopyTo Vector4.CopyTo Vector4.CopyTo Vector4.CopyTo Method

Definition

Copies the elements of a vector to an array.

Overloads

CopyTo(Single[]) CopyTo(Single[]) CopyTo(Single[]) CopyTo(Single[])

Copies the elements of the vector to a specified array.

CopyTo(Single[], Int32) CopyTo(Single[], Int32) CopyTo(Single[], Int32) CopyTo(Single[], Int32)

Copies the elements of the vector to a specified array starting at a specified index position.

CopyTo(Single[]) CopyTo(Single[]) CopyTo(Single[]) CopyTo(Single[])

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())

Parameters

array
Single[]

The destination array.

Exceptions

The number of elements in the current instance is greater than in the array.

Remarks

array must have at least four elements. The method copies the vector's elements starting at index 0.

CopyTo(Single[], Int32) CopyTo(Single[], Int32) CopyTo(Single[], Int32) CopyTo(Single[], Int32)

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)

Parameters

array
Single[]

The destination array.

index
Int32 Int32 Int32 Int32

The index at which to copy the first element of the vector.

Exceptions

The number of elements in the current instance is greater than in the array.

index is less than zero.

-or-

index is greater than or equal to the array length.

Remarks

array must have a sufficient number of elements to accommodate the four vector elements. In other words, elements index through index + 3 must already exist in array.

Applies to