toString Summary Returns a string representation of the stack. Usage public override string toString() Returns A string representation of the stack and its elements. Description Returns a string representation of the stack and its elements. Examples Basic Usage 1234import System; auto stack = new Stack<int>([ 1, 2, 3 ]);Console.log(stack.toString()); // "1, 2, 3" Share HTML | BBCode | Direct Link