Stack<string> s = new Stack<string>(); > s.Push("A"); > s.Push("B"); > s.Push("C"); // C,B,A > s.Reverse(); // A,B,C >Hi Viv,
Stack<string> s = new Stack<string>(); s.Push("A"); s.Push("B"); s.Push("C"); // C,B,A s.Reverse(); // A,B,C while (s.Count != 0) { Console.WriteLine(s.Pop()); } Console.ReadLine(); // C, B, A