Example #1
0
        static void Main(string[] args)
        {
            var stack = new LinkedStack <int>();

            stack.Push(2);
            for (int i = 0; i < 4; i++)
            {
                stack.Push(i);
            }
            Console.WriteLine(stack.Pop());

            Console.WriteLine(string.Join(", ", stack.ToArray()));
        }
        public static void Main()
        {
            var stack = new LinkedStack <int>();

            stack.Push(1);
            stack.Push(2);
            stack.Push(3);
            stack.Push(4);
            stack.Push(5);
            stack.Push(6);
            stack.Push(7);
            Console.WriteLine(string.Join(" ", stack.ToArray()));
        }