You have the following code (line numbers are included for reference only):
You need to ensure that if an exception occurs, the exception will be logged.
Which code should you insert at line 28?

A.
Option A
B.
Option B
C.
Option C
D.
Option D
Explanation:
* XmlWriterTraceListener
Directs tracing or debugging output as XML-encoded data to a TextWriter or to a Stream, such as a
FileStream.
i’m a little bit confused… why here http://www.aiotestking.com/microsoft/which-code-should-you-insert-at-line-28-5/#comment-804146 it’s different the correct answer?
1
0
Answer A is correct. I tested all answers with the following result:
Answer A – correct output file
Answer B – output file empty
Answer C – first param is message, second param is category –> no output file produced –> nonsens
Answer D – The parameter for the TraceSource constructor is the NAME of the trace source –> no output file produced –> nonsens
3
0