Question:You have recently created an application, and want to capture all debugging text messages
generated by it.
You would like these debugging messages to display on the command line. The application that
you
created contains the following code:
Debug.WriteLine("Start the processing")
Console.WriteLine("Generated by Console.WriteLine")
Debug.WriteLine("End the processing")
You need to ensure that you are able to capture all debugging messages to the command line.
What should you do? - (VB.Net) 

A Use the following code:
Debug.Listeners.Add(New TextWriterTraceListener(Console.Out))
Debug.AutoFlush = True 

B Use the following code:
Debug.Listeners.Add(New StreamWriter(Console.Out))
Debug.AutoFlush = True 

C Use the following code:
Debug.Listeners.Add(New ConsoleTraceListener())
Debug.AutoFlush = True 

D Use the following code:
Debug.Listeners.Add(New DefaultTraceListener())
Debug.AutoFlush = True 

+ Answer
+ Report
Total Preview: 806

Copyright © 2024. Powered by Intellect Software Ltd