Sdílet prostřednictvím


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

Definition

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

 virtual void System.Collections.Generic.ICollection<System.String>.CopyTo(cli::array <System::String ^> ^ array, int arrayIndex) = System::Collections::Generic::ICollection<System::String ^>::CopyTo;
void ICollection<string>.CopyTo (string?[]? array, int arrayIndex);
abstract member System.Collections.Generic.ICollection<System.String>.CopyTo : string[] * int -> unit
override this.System.Collections.Generic.ICollection<System.String>.CopyTo : string[] * int -> unit
Sub CopyTo (array As String(), arrayIndex As Integer) Implements ICollection(Of String).CopyTo

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