XmlSchemaObjectCollection::Insert Method (Int32, XmlSchemaObject^)
Inserts an XmlSchemaObject to the XmlSchemaObjectCollection.
Assembly: System.Xml (in System.Xml.dll)
Parameters
- index
-
Type:
System::Int32
The zero-based index at which an item should be inserted.
- item
-
Type:
System.Xml.Schema::XmlSchemaObject^
The XmlSchemaObject to insert.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | index is less than zero. -or- index is greater than Count. |
If Count already equals the capacity, the capacity of the list is doubled by automatically reallocating the internal array before the new element is inserted.
If index is equal to Count, value is added to the end of XmlSchemaObjectCollection.
The elements that follow the insertion point move down to accommodate the new element.
Available since 1.1