IListContract<T>.SetItem Method (Int32, T)

 

Sets the item at the specified index in an IListContract<T> collection.

Namespace:   System.AddIn.Contract
Assembly:  System.AddIn.Contract (in System.AddIn.Contract.dll)

void SetItem(
	int index,
	T item
)

Parameters

index
Type: System.Int32

The zero-based index at which to set the item.

item
Type: T

The item to set at the specified index.

Exception Condition
IndexOutOfRangeException

index is less than zero.

-or-

index is equal to or greater than the return value of the GetCount method.

NotSupportedException

The IListContract<T> collection is read-only.

The SetItem method sets the item at the specified index. To add an item to the IListContract<T> collection, use the Insert method.

To determine whether an IListContract<T> collection is read-only, call the GetIsReadOnly method.

.NET Framework
Available since 3.5
Return to top
Show: