Open sandboxFocus

Method MoveItem

MoveItem(T, int, int)

Moves the element at the specified index to another index in the underlying collection.

Declaration
protected virtual void MoveItem(T item, int oldIndex, int newIndex)
Parameters
Type Name Description
T item

The element to be moved.

int oldIndex

The old zero-based index of item in the collection.

int newIndex

The new zero-based index of item in the collection.

Remarks

Some redundancy is created by requiring both item and oldIndex: this is intentional, for performance reasons.