Gemstone Common Library
Show/Hide TOC

# ListCollection T SetItem Method

Replaces the element at the specified index.

## Definition

Namespace: Gemstone.Collections
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.159 -- Release Build+a612c25bc0e1c87e5766544ec4650d2ebcfddcf4
C#
View Source Request Example

    protected override void SetItem(
    	int index,
    	T item
    )

VB
View Source Request Example

    Protected Overrides Sub SetItem (
    	index As Integer,
    	item As T
    )

C++
View Source Request Example

    protected:
    virtual void SetItem(
    	int index,
    	T item
    ) override

JavaScript
View Source Request Example

    function SetItem(index, item);

#### Parameters

index Int32
  The zero-based index of the element to replace.
item T
  The new value for the element at the specified index. The value can be null for reference types.

## Exceptions

ArgumentOutOfRangeException | index is less than zero.-or-index is greater than Count.

## See Also

#### Reference

ListCollectionT Class
Gemstone.Collections Namespace