Vector<T>.CopyTo Vector<T>.CopyTo Vector<T>.CopyTo Vector<T>.CopyTo Method

Definition

Overloads

CopyTo(Span<Byte>) CopyTo(Span<Byte>) CopyTo(Span<Byte>) CopyTo(Span<Byte>)

Copies the vector to the given Span<T>.

CopyTo(Span<T>) CopyTo(Span<T>) CopyTo(Span<T>) CopyTo(Span<T>)

Copies the vector to the given span. .

CopyTo(T[]) CopyTo(T[]) CopyTo(T[]) CopyTo(T[])

Copies the vector instance to a specified destination array.

CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32)

Copies the vector instance to a specified destination array starting at a specified index position.

CopyTo(Span<Byte>) CopyTo(Span<Byte>) CopyTo(Span<Byte>) CopyTo(Span<Byte>)

Copies the vector to the given Span<T>.

public:
 void CopyTo(Span<System::Byte> destination);
public void CopyTo (Span<byte> destination);
member this.CopyTo : Span<byte> -> unit
Public Sub CopyTo (destination As Span(Of Byte))

Parameters

destination
Span<Byte>

The destination span to which the values are copied. The destination span must be at least size Count.

Exceptions

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

CopyTo(Span<T>) CopyTo(Span<T>) CopyTo(Span<T>) CopyTo(Span<T>)

Copies the vector to the given span. .

public:
 void CopyTo(Span<T> destination);
public void CopyTo (Span<T> destination);
member this.CopyTo : Span<'T (requires 'T : struct)> -> unit
Public Sub CopyTo (destination As Span(Of T))

Parameters

destination
Span<T> Span<T> Span<T> Span<T>

The destination span to which the values are copied. The destination span must be at least size Count.

Exceptions

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

CopyTo(T[]) CopyTo(T[]) CopyTo(T[]) CopyTo(T[])

Copies the vector instance to a specified destination array.

public:
 void CopyTo(cli::array <T> ^ destination);
public void CopyTo (T[] destination);
member this.CopyTo : 'T[] -> unit
Public Sub CopyTo (destination As T())

Parameters

destination
T[]

The array to receive a copy of the vector values.

Exceptions

The number of elements in the current vector is greater than the number of elements available in the destination array.

Remarks

The copy operation begins at index 0 of destination. The destination array must have at least Vector<T>.Count elements.

CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32)

Copies the vector instance to a specified destination array starting at a specified index position.

public:
 void CopyTo(cli::array <T> ^ destination, int startIndex);
public void CopyTo (T[] destination, int startIndex);
member this.CopyTo : 'T[] * int -> unit
Public Sub CopyTo (destination As T(), startIndex As Integer)

Parameters

destination
T[]

The array to receive a copy of the vector values.

startIndex
Int32 Int32 Int32 Int32

The starting index in destination at which to begin the copy operation.

Exceptions

The number of elements in the current instance is greater than the number of elements available from startIndex to the end of the destination array.

index is less than zero or greater than the last index in destination.

Remarks

The copy operation begins at index startIndex of destination. The destination array must have at least startIndex + Vector<T>.Count elements.

Applies to