JsonNodeListInsert Method
Inserts an item into the list, checking for duplication.
Namespace: MichaelBrooks.UK.JsonAssembly: JsonDOM (in JsonDOM.dll) Version: 1.0.7
public void Insert(
int index,
JsonNode item
)
Parameters
- index Int32
- The zero-based location where the item is to reside. Existing list items at that location
and higher-numbered index locations are moved to the next higher index location to make space for the insert.
- item JsonNode
- The item to insert.
Note that it is valid to insert an item at the index location equal to the current value of the Count property,
as this is effectively the same as appending the item to the end of the list.
Online page.
| ArgumentOutOfRangeException | index is less than zero or greater than
value of Count property. |
| JsonNodeListDuplicateItemException | Thrown when item already exists in the list. |
| InvalidOperationException | Thrown when item has the wrong parent. |