You are developing an application.
The application contains the following code:
When you compile the code, you receive the following syntax error message: “A previous catch
clause already catches all exceptions of this or a super type (‘System.Exception’).”
You need to ensure that the code can be compiled. What should you do?

A.
Catch the ArgumentException exception instead of the ArgumentNullException exception.
B.
Throw a new exception in the second catch block.
C.
Catch the ArgumentNullException exception first.
D.
Re-throw the exception caught by the second catch block.
A
0
0
WTF
this question is wrong!!!
1
0
I believe question shoud be:
…
catch(Exception e)
{..}
catch(ArgumentNullException e)
{..}
…
Then the correct answer should be C – Catch the ArgumentNullException exception first.
2
0
question has to be wrong. wasted time trying to look for trick.
what ICI said.it couldnt be anything else
exception -> systemexception -> argumentexception->argumentnullexception
0
0
I test the question on VS 2017 and it seems the question is wrong,
With the current Syntax there is no error and the code will compile successfully
0
0