Class StackExtensions
Extension methods for
Inheritance
System.Object
StackExtensions
Namespace: X10D.Collections
Assembly: X10D.dll
Syntax
public static class StackExtensions : object
Methods
| Improve this Doc View SourcePopAll<TElement>(Stack<TElement>)
Removes and returns each element from the stack starting at the top, until the stack is empty.
Declaration
public static IEnumerable<TElement> PopAll<TElement>(this Stack<TElement> stack)
Parameters
Type | Name | Description |
---|---|---|
Stack<TElement> | stack | The stack from which the elements will be removed. |
Returns
Type | Description |
---|---|
IEnumerable<TElement> |
Type Parameters
Name | Description |
---|---|
TElement | The type of the element. |
PushAll<TElement>(Stack<TElement>, IEnumerable<TElement>)
Adds an enumerable collection of objects to the top of the
Declaration
public static void PushAll<TElement>(this Stack<TElement> stack, IEnumerable<TElement> values)
Parameters
Type | Name | Description |
---|---|---|
Stack<TElement> | stack | The stack to which the elements will be added. |
IEnumerable<TElement> | values | An enumerable collection of elements to push. |
Type Parameters
Name | Description |
---|---|
TElement | The type of the element. |