PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Collection<T>Move­Item
Open sandboxFocus

AdvisableCollection<T>.MoveItem Method

MoveItem(T, Int32, Int32)

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

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

The element to be moved.

Int32 oldIndex

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

Int32 newIndex

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


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