isEmpty Summary Checks if the stack is empty. Usage public bool isEmpty() Returns true if the stack does not contain any elements and false otherwise. Description Checks if the stack is empty and contains zero elements. Examples Basic Usage 1234567import System; auto stack1 = new Stack<int>();auto stack2 = new Stack<int>([ 1, 2, 3 ]); Console.log(stack1.isEmpty()); // trueConsole.log(stack2.isEmpty()); // false Share HTML | BBCode | Direct Link