DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="1.2.10" />

 Stack

public static class Stack
Provides various extension methods for class Stack<T>.
public static Stack<T> Clone<T>(this Stack<T> original)

Creates a clone of the stack preserving order of elements into it.

public static bool TryPeek<T>(this Stack<T> stack, out T obj)

Attempts to obtain an object at the top of the stack without removing it.

public static bool TryPop<T>(this Stack<T> stack, out T obj)

Attempts to remove object at the top of the stack.