語言

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

定義

將整個 StringValues資料複製到字串陣列,從目標陣列指定的索引開始。

 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

參數

array
String[]

即一維 Array ,也就是所複製元素的目的地。 必須 Array 有零基索引。

arrayIndex
Int32

目的陣列中以零為基礎的索引,從那裡開始複製。

實作

例外狀況

array 為 null。

arrayIndex 小於0。

來源 StringValues 中的元素數量大於從 arrayIndex 目的地 array到末端的可用空間。

適用於