You are developing an application that uses structured exception handling. The application
includes a class named ExceptionLogger.
The ExceptionLogger class implements a method named LogException by using the
following code segment:
public static void LogException(Exception ex)
You have the following requirements:
Log all exceptions by using the LogException() method of the ExceptionLogger class.
Rethrow the original exception, including the entire exception stack.
You need to meet the requirements.
Which code segment should you use?

A.
Option A
B.
Option B
C.
Option C
D.
Option D
Ans. A
0
0
Why not B ?
0
0
because throw ex; won’t save stacktrace. You should use throw; to save it.
0
0
I find that B is correct
0
0
A
throw ex resets the stack trace
throw does not
1
0
it’s not B, because you’ll lose same informations about original exception
0
0
Why not C ?
0
0
because new Exception() doesn’t contain any information about exception happened, it’s just new empty object
0
0