Επεξεργασία

Κοινή χρήση μέσω


Vector4.CopyTo Method

Definition

Copies the elements of a vector to an array.

Overloads

CopyTo(Single[], Int32)

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

CopyTo(Span<Single>)

Copies the vector to the given Span<T>. The length of the destination span must be at least 4.

CopyTo(Single[])

Copies the elements of the vector to a specified array.

CopyTo(Single[], Int32)

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

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);
public readonly 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

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

Exceptions

array is null.

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.

array is multidimensional.

array is null.

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

CopyTo(Span<Single>)

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

Copies the vector to the given Span<T>. The length of the destination span must be at least 4.

public:
 void CopyTo(Span<float> destination);
public readonly void CopyTo (Span<float> destination);
member this.CopyTo : Span<single> -> unit
Public Sub CopyTo (destination As Span(Of Single))

Parameters

destination
Span<Single>

The destination span which the values are copied into.

Exceptions

The number of elements in the source vector is greater than the number of elements available in the destination span.

Applies to

CopyTo(Single[])

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

Copies the elements of the vector to a specified array.

public:
 void CopyTo(cli::array <float> ^ array);
public void CopyTo (float[] array);
public readonly void CopyTo (float[] array);
member this.CopyTo : single[] -> unit
Public Sub CopyTo (array As Single())

Parameters

array
Single[]

The destination array.

Exceptions

array is null.

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

array is multidimensional.

array is null.

Remarks

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

Applies to