ObservableCollection<T>.SetItem Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Replaces the item at the specified index.
Assembly: System (in System.dll)
Parameters
- index
- Type: System.Int32
The zero-based index of the item to replace.
- item
- Type: T
The new value for the item at the specified index.
| 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 SetItem method of the Collection<T> base class.
Show: