/ Published in: C#
This is particularly useful for unit testing, but you could do it anywhere in your code.
- //Use TestInitialize to run code before running each test
- public void MyTestInitialize()
- Trace.Listeners.Add(new ConsoleTraceListener());
- // Implementation
- Trace.WriteLine("Tracing my program execution");
You need to login to post a comment.