Table of Contents

Method Replace

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Replace<T>(Stack<T>, T, T, IEqualityComparer<T>)

Replaces an 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<T>

The stack object.

valueToReplace T

Value to replace.

valueToReplaceWith T

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

comparer IEqualityComparer<T>

The comparison object.

Type Parameters

T

The stack object type.