Exemple #1
0
 public static void CatchIt()
 {
     try
     {
         CreateExceptions.ThrowIt("2");
     }
     // Uncomment to show compiler warning/error.
     // catch (Exception e) { }
     catch (Exception) { }
 }
 public static void ThrowIt()
 {
     try
     {
         CreateExceptions.ThrowIt("2");
     }
     finally
     {
         throw new NotSupportedException();
     }
 }
Exemple #3
0
 public static void Rethrow()
 {
     try
     {
         CreateExceptions.ThrowIt("2");
     }
     catch (ArgumentException e)
     {
         throw e;
     }
 }