Method MoveTo
MoveTo<T>(Stack<T>, T, int, IEqualityComparer<T>)
Move the stack object value to the index.
public static void MoveTo<T>(this Stack<T> stack, T valueToMove, int index = 0, IEqualityComparer<T> comparer = null)
Parameters
stack
Stack<T>The stack object.
valueToMove
TValue to move.
index
intThe index where to move.
comparer
IEqualityComparer<T>The comparison object.
Type Parameters
T
The stack object type.