Stack (Constructor) Summary Constructs a System.Stack<T> object. Signatures Click on a signature to select it and view its documentation. public Stack() public Stack(T[] data) Usage public Stack() public Stack(T[] data) Parameters data The data to initialize the System.Stack<T> object with. Description Constructs an empty stack. Constructs a System.Stack<T> object initialized to the specified data. Examples Initialization with data 1234import System; auto stack = new System.Stack<int>([ 1, 2, 3 ]);Console.log(stack.pop()); // 3 Share HTML | BBCode | Direct Link