Editar

Partilhar via


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

Definition

Copies the entire Array to a compatible one-dimensional array, starting at the specified index of the target 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

Parameters

array
JsonNode[]

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

index
Int32

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

Implements

Exceptions

array is null.

index is less than 0.

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

Applies to