Thursday, May 3, 2018

Routing Trace to Console

ConsoleTraceListener listener = new ConsoleTraceListener();
Trace.Listeners.Add(listener);

Trace.WriteLine("Trace Logs");

Trace.Listeners.Remove(listener);

Trace.Close();

No comments:

Post a Comment