Click or drag to resize
CollectionTSetItem Method
Replaces the element at the specified index.

Namespace: System.Collections.ObjectModel
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
protected virtual void SetItem(
	int index,
	T item
)

Parameters

index
Type: SystemInt32
The zero-based index of the element to replace.
item
Type: T
The new value for the element at the specified index. The value can be null for reference types.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionindex is less than zero.-or-index is greater than Count.
See Also