lenelex.com
Home
Quizzes
Games
Register
Log in
Question 1 of 10
What is the output of the program below?
try { int a = 0, b = a; if (b == 0) { throw new ArgumentOutOfRangeException(); } Console.Write(">try"); } catch (ArgumentOutOfRangeException) { Console.Write(">catch:argument"); } catch (Exception) { Console.Write(">catch:exception"); } finally { Console.Write(">finally"); }
A. >try>catch:exception>finally
B. >catch:argument>catch:exception
C. >catch:argument>finally
D. >catch:argument>catch:exception>finally
E. >catch:exception>finally
Links:
The Throw Statement
The Try-Catch Statement
Try-Catch-Finally
Exceptions and Exception Handling