예제 #1
0
        private static void testStringStack()
        {
            StringStack stacks = new StringStack();

            for (int i = 0; i < 100; i++)
            {
                stacks.Push(i.ToString());
            }

            Console.WriteLine(stacks.ToString());
            Console.WriteLine(stacks.Pop());
            Console.WriteLine(stacks.Pop());
            stacks.Push("i.ToString()");
            Console.WriteLine(stacks.ToString());
            for (int i = 0; i < 100; i++)
            {
                stacks.Push(i.ToString());
            }

            Console.WriteLine(stacks.ToString());
        }