JsonArray.ICollection<JsonNode>.CopyTo(JsonNode[], Int32) 方法

定義

從目標陣列的指定索引處開始,將整個 Array 複製到相容的一維陣列中。

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

參數

array
JsonNode[]

一維 Array,是從 JsonArray 複製過來之項目的目的端。 陣列必須有以零為基底的索引。

index
Int32

array 中以零起始的索引,即開始複製的位置。

實作

例外狀況

arraynull

index 小於 0。

來源 ICollection 中的專案數目大於從 index 到目的地 array 結尾的可用空間。

適用於