Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     try
     {
         StockItem s = new StockItem(-1);
     }
     catch (StockItemException ex)
     {
         Console.WriteLine("StockItem Error : " + ex.Message);
     }
     catch (Exception)
     {
         Console.WriteLine("General Error");
     }
     // Hold console åben ved debug
     if (System.Diagnostics.Debugger.IsAttached)
     {
         Console.Write("Press any key to continue . . . ");
         Console.ReadKey();
     }
 }