ImmutableArray<T>.CopyTo Method

Definition

Overloads

CopyTo(Span<T>)

Copies the elements of current ImmutableArray<T> to a Span<T>.

CopyTo(T[])

Copies the contents of this array to the specified array.

CopyTo(T[], Int32)

Copies the contents of this array to the specified array starting at the specified destination index.

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

Copies the specified items in this array to the specified array at the specified starting index.

CopyTo(Span<T>)

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Copies the elements of current ImmutableArray<T> to a Span<T>.

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

Parameters

destination
Span<T>

The Span<T> that is the destination of the elements copied from current ImmutableArray<T>.

Applies to

.NET 10 and other versions
Product Versions
.NET 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

CopyTo(T[])

Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs

Copies the contents of this array to the specified array.

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

Parameters

destination
T[]

The array to copy to.

Applies to

.NET 10 and other versions
Product Versions
.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 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

CopyTo(T[], Int32)

Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs

Copies the contents of this array to the specified array starting at the specified destination index.

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

Parameters

destination
T[]

The array to copy to.

destinationIndex
Int32

The index in destination where copying begins.

Implements

Applies to

.NET 10 and other versions
Product Versions
.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 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

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

Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs
Source:
ImmutableArray_1.Minimal.cs

Copies the specified items in this array to the specified array at the specified starting index.

C#
public void CopyTo(int sourceIndex, T[] destination, int destinationIndex, int length);

Parameters

sourceIndex
Int32

The index of this array where copying begins.

destination
T[]

The array to copy to.

destinationIndex
Int32

The index in destination where copying begins.

length
Int32

The number of elements to copy from this array.

Applies to

.NET 10 and other versions
Product Versions
.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 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0