ObservableCollection<T>.InsertItem Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Inserts an item into the collection at the specified index.
Assembly: System (in System.dll)
Parameters
- index
- Type: System.Int32
The zero-based index at which item should be inserted.
- item
- Type: T
The object to insert.
| Exception | Condition |
|---|---|
| InvalidOperationException | The method is being called in a PropertyChanged or CollectionChanged event handler. |
This implementation raises the CollectionChanged event.
For more information, see the InsertItem method of the Collection<T> base class.
Show: