語言

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 。

實作

例外狀況

array 是 null。

index 小於0。

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

適用於