Export (0) Print
Expand All

IListContract<T>.SetItem Method

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.

ExceptionCondition
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

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft