So I have a generic list, and an oldIndex and a newIndex value.
oldIndex
newIndex
I want to move the item at oldIndex, to newIndex.
List.Remove() and List.RemoveAt() do not return the item that is being removed.
Therefore you have to use this:
var item = list[oldIndex]; list.RemoveAt(oldIndex); list.Insert(newIndex, item);