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
stack
Stack<T>The stack object.
valueToFind
TValue to find.
comparer
IEqualityComparer<T>The comparison object.
Returns
- bool
true
If the value was found.false
otherwise.
Type Parameters
T
The stack object type.