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
)

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.

.NET Framework
Available since 1.1
Return to top
Show: