Class StackExtensions
- Namespace
- NanoByte.Common.Collections
- Assembly
- NanoByte.Common.dll
Provides extension methods for System.Collections.Generic.Stack<T>s.
public static class StackExtensions
- Inheritance
-
objectStackExtensions
Methods
PopEach<T>(Stack<T>, Action<T>)
System.Collections.Generic.Stack<T>.Pop()s each element of a System.Collections.Generic.Stack<T> and performs an action with the resulting element.
public static void PopEach<T>(this Stack<T> stack, Action<T> action)
Parameters
stack
Stack<T>The stack to pop elements from.
action
Action<T>An action to be invoked for each element on the
stack
.
Type Parameters
T