Which code should you insert at line 28?

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?

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.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Begia

Begia

A is correct but ,it’s best to use using keyword with XmlWriteTraceListener class

Lord Vader

Lord Vader

Trace.WriteLine Method

Writes information about the trace to the trace listeners in the Listeners collection.

Lord Vader

Lord Vader

u need to subscribe to the listeners first