Replaces the element at the specified index.

Namespace: DigitalRune.Collections
Assembly: DigitalRune (in DigitalRune.dll) Version: 1.10.0.0 (1.10.0.9503)

Syntax

C#
protected override void SetItem(
	int index,
	T item
)
Visual Basic
Protected Overrides Sub SetItem ( _
	index As Integer, _
	item As T _
)
Visual C++
protected:
virtual void SetItem(
	int index, 
	T item
) override

Parameters

index
Type: System..::..Int32
The zero-based index of the element to replace.
item
Type: T
The new value for the element at the specified index.

Exceptions

ExceptionCondition
System..::..ArgumentOutOfRangeExceptionindex is less than zero or is greater than Count.
System..::..ArgumentNullExceptionitem is nullNothingnullptra null reference (Nothing in Visual Basic). The collection does not allow nullNothingnullptra null reference (Nothing in Visual Basic) values. See AllowNull.
System..::..ArgumentExceptionitem is already contained in the collection. The collection does not allow duplicate items. See AllowDuplicates.

See Also