Method Contains
Contains<T>(Stack<T>, T, IEqualityComparer<T>)
Check if the stack object contains the value to find.
public static bool Contains<T>(this Stack<T> stack, T valueToFind, IEqualityComparer<T> comparer = null)
Parameters
stackStack<T>The stack object.
valueToFindTValue to find.
comparerIEqualityComparer<T>The comparison object.
Returns
- bool
trueIf the value was found.falseotherwise.
Type Parameters
TThe stack object type.