Redigeeri

Jagamisviis:


Vector<T>.CopyTo Method

Definition

Overloads

CopyTo(Span<Byte>)

Copies the vector to the given Span<T>.

CopyTo(Span<T>)

Copies the vector to the given span. .

CopyTo(T[])

Copies the vector instance to a specified destination array.

CopyTo(T[], Int32)

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

CopyTo(Span<Byte>)

Source:
Vector_1.cs
Source:
Vector_1.cs
Source:
Vector_1.cs

Copies the vector to the given Span<T>.

public:
 void CopyTo(Span<System::Byte> destination);
public readonly void CopyTo (Span<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.

.NET 5 and later: Type T is not supported.

Applies to

CopyTo(Span<T>)

Source:
Vector_1.cs
Source:
Vector_1.cs
Source:
Vector_1.cs

Copies the vector to the given span. .

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

Parameters

destination
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.

.NET 5 and later: Type T is not supported.

Applies to

CopyTo(T[])

Source:
Vector_1.cs
Source:
Vector_1.cs
Source:
Vector_1.cs

Copies the vector instance to a specified destination array.

public:
 void CopyTo(cli::array <T> ^ destination);
public void CopyTo (T[] destination);
public readonly 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

destination is null.

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

.NET 5 and later: Type T is not supported.

destination is null.

Remarks

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

Applies to

CopyTo(T[], Int32)

Source:
Vector_1.cs
Source:
Vector_1.cs
Source:
Vector_1.cs

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

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

Exceptions

destination is null.

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.

.NET 5 and later: Type T is not supported.

destination is null.

Remarks

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

Applies to