Op Englesch liesen Editéieren

Deelen iwwer


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

C#
public void CopyTo(Span<byte> destination);
C#
public readonly void CopyTo(Span<byte> destination);

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

.NET 10 an aner Versiounen
Produkt Versiounen
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CopyTo(Span<T>)

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

Copies the vector to the given span. .

C#
public void CopyTo(Span<T> destination);
C#
public readonly void CopyTo(Span<T> destination);

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

.NET 10 an aner Versiounen
Produkt Versiounen
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CopyTo(T[])

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

Copies the vector instance to a specified destination array.

C#
public void CopyTo(T[] destination);
C#
public readonly void CopyTo(T[] destination);

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

.NET 10 an aner Versiounen
Produkt Versiounen
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1
UWP 10.0

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.

C#
public void CopyTo(T[] destination, int startIndex);
C#
public readonly void CopyTo(T[] destination, int startIndex);

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

.NET 10 an aner Versiounen
Produkt Versiounen
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1
UWP 10.0