Consider the following code:
try{
....
} catch(Exception) {
return null;
throw;
}
Does it make any sense?
Normally, if you put any codes after return, Visual Studio marks that as unreachable code, but for this case, it does not. Is there a reason for that?
Edit
As a complement to the question, I want to ask another one.
What happens if I throw the exception in the finally block, after return?
try{
....
} catch(Exception) {
return null;
} finally {
throw new Exception();
}