IList.Insert Method

XmlAnyElementAttributes.IList.Insert Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Inserts an item in the list at a specified index.

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

void IList.Insert(
	int index,
	Object value
)

Parameters

index
Type: System.Int32
The zero-based index at which value should be inserted.
value
Type: System.Object
The object to insert into the list.

Implements

IList.Insert(Int32, Object)

ExceptionCondition
ArgumentOutOfRangeException

The index is not valid for the collection; it is either too large or less than zero.

If index equals the number of items in the list, then value is appended to the end of the list.

Note that when an interface method is explicitly implemented, it is no longer visible as a public member of the class. The only way to access it is through the interface.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft