StringValues.ICollection<String>.CopyTo(String[], Int32) Method

Definition

Copies the entire StringValuesto a string array, starting at the specified index of the target array.

C#
void ICollection<string>.CopyTo(string?[]? array, int arrayIndex);

Parameters

array
String[]

The one-dimensional Array that is the destination of the elements copied from. The Array must have zero-based indexing.

arrayIndex
Int32

The zero-based index in the destination array at which copying begins.

Implements

Exceptions

array is null.

arrayIndex is less than 0.

The number of elements in the source StringValues is greater than the available space from arrayIndex to the end of the destination array.

Applies to

Produkt Versioner
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)