Пример #1
0
 static void Main(string[] args)
 {
     Stack stack = new Stack();
     try
     {
         stack.Pop();
         stack.PrintStack();
     }
     catch (EmptyStackException ex)
     {
         Console.WriteLine("Caught Exception");
         Console.WriteLine("Error: " + ex.Message);
     }
 }
Пример #2
0
 public void Initialize()
 {
     stack = new Stack();
 }