Advertisement
Guest User

Untitled

a guest
May 21st, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1.     static class A
  2.     {
  3.         public static void Exc1()
  4.         {
  5.             int a = 10;
  6.             a = a / 0;
  7.         }
  8.  
  9.         public static void Exc2()
  10.         {
  11.             try
  12.             {
  13.                 int a = 10;
  14.                 a = a / 0;
  15.             }
  16.             catch(Exception ex)
  17.             {
  18.                 throw new Exception("Dzielenie przez 0");
  19.             }
  20.         }
  21.  
  22.         public static void Exc3()
  23.         {
  24.             try
  25.             {
  26.                 int a = 10;
  27.                 a = a / 0;
  28.             }
  29.             catch (Exception ex)
  30.             {
  31.                 throw ex;
  32.             }
  33.         }
  34.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement