Method FindDuplicates
FindDuplicates<T>(Stack<T>, IEqualityComparer<T>)
Find all duplicates stack objects values.
public static Stack<T> FindDuplicates<T>(this Stack<T> stack, IEqualityComparer<T> comparer = null)
Parameters
stackStack<T>The stack object.
comparerIEqualityComparer<T>The comparison object.
Returns
- Stack<T>
The duplicates stack object.
Type Parameters
TThe stack object type.