TYPE
Stack<T>
LIFO collection; Push adds to the top and Pop removes that item.
Formal Syntax & Structure
csharp syntaxcsharp
new Stack<T>()Working Example
Example Snippetcsharp
using System.Collections.Generic;var s = new Stack<int>();s.Push(2);s.Push(3);System.Console.WriteLine(s.Pop());