Export (0) Print
Expand All

JsonArray.Insert Method

Insert a JSON CLR type into the array at a specified index.

Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)

public void Insert(
	int index,
	JsonValue item
)

Parameters

index
Type: System.Int32
The zero-based index at which the item should be inserted.
item
Type: System.Json.JsonValue
The JsonValue object to insert.

Implements

IList<T>.Insert(Int32, T)

ExceptionCondition
ArgumentOutOfRangeException

items is less than zero or larger than the size of the array.

Note that null is a valid value for item and that duplicate elements are allowed. If the insertion exceeds the capacity of the JsonArray, its size is automatically increased by reallocating the internal array, and the existing elements are copied to the new array before the new element is added. If index is equal to Count, item is added to the end of JsonArray.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft