Method Replace | Terminal.Gui v2 (original) (raw)

Namespace

Terminal.Gui

Assembly

Terminal.Gui.dll

Replace(Stack, T, T, IEqualityComparer)

Replaces a stack object values that match with the value to replace.

public static void Replace<T>(this Stack<T> stack, T valueToReplace, T valueToReplaceWith, IEqualityComparer<T> comparer = null)

Parameters

stack Stack

The stack object.

valueToReplace T

Value to replace.

valueToReplaceWith T

Value to replace with to what matches the value to replace.

comparer IEqualityComparer

The comparison object.

Type Parameters

T

The stack object type.