Windows apps
Collapse the table of content
Expand the table of content

Vector3::CopyTo Method (array<Single>, Int32)

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

Namespace:  System.Numerics
Assembly:  System.Numerics.Vectors (in System.Numerics.Vectors.dll)

public:
void CopyTo(
	array<float>^ array, 
	int index
)

Parameters

array
Type: array<System::Single>

The destination array.

index
Type: System::Int32

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

ExceptionCondition
ArgumentNullException

array is nullptr.

ArgumentException

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

ArgumentOutOfRangeException

index is less than zero.

-or-

index is greater than or equal to the array length.

RankException

array is multidimensional.

array must have a sufficient number of elements to accommodate the three vector elements. In other words, elements index, index + 1, and index + 2 must already exist in array.

Show:
© 2017 Microsoft