XmlSchemaObjectCollection.Insert Method (Int32, XmlSchemaObject)


Inserts an XmlSchemaObject to the XmlSchemaObjectCollection.

Namespace:   System.Xml.Schema
Assembly:  System.Xml (in System.Xml.dll)

public void Insert(
	int index,
	XmlSchemaObject item


Type: System.Int32

The zero-based index at which an item should be inserted.

Type: System.Xml.Schema.XmlSchemaObject

The XmlSchemaObject to insert.

Exception Condition

index is less than zero.


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.

.NET Framework
Available since 1.1
Return to top