Table of Contents

Class StackExtensions

Namespace
NanoByte.Common.Collections
Assembly
NanoByte.Common.dll

Provides extension methods for Stack<T>s.

public static class StackExtensions
Inheritance
StackExtensions

Methods

PopEach<T>(Stack<T>, Action<T>)

Pop()s each element of a 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