예제 #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();
 }