70-516 · Question #257
You are developing a Microsoft .NET Framework 4 application. You need to collect performance data to the event log after the application is deployed to the production environment. Which two…
The correct answer is B. A trace listener C. Trace.WriteLine() statements. Tracing is a way for you to monitor the execution of your application while it is running. For example, suppose you set up two listeners: a TextWriterTraceListener and an EventLogTraceListener. Each listener receives the same message. The TextWriterTraceListener would direct…
Question
You are developing a Microsoft .NET Framework 4 application. You need to collect performance data to the event log after the application is deployed to the production environment. Which two components should you include in the project? (Each correct answer presents part of the solution. Choose two.)
Options
- AA debug listener
- BA trace listener
- CTrace.WriteLine() statements
- DDebug.Asset() statements
- EDebug.WriteLineQ statements
How the community answered
(19 responses)- A11% (2)
- B84% (16)
- D5% (1)
Explanation
Tracing is a way for you to monitor the execution of your application while it is running. For example, suppose you set up two listeners: a TextWriterTraceListener and an EventLogTraceListener. Each listener receives the same message. The TextWriterTraceListener would direct its output to a stream, and the EventLogTraceListener would direct its output to an The following example shows how to send output to the Listeners collection. // Use this example when debugging. System.Diagnostics.Debug.WriteLine("Error in Widget 42"); // Use this example when tracing. System.Diagnostics.Trace.WriteLine("Error in Widget 42");
Topics
Community Discussion
No community discussion yet for this question.