using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
public class MainClass
{
public static void Main()
{
Trace.Listeners.Add(new ConsoleTraceListener());
TraceSource customerTraceSource = new TraceSource("YourClassName");
Trace.WriteLine("Instantiated a new customer {0}", "asdf");
Debug.Assert(1 == 2, "1 ==2");
customerTraceSource.TraceEvent(TraceEventType.Warning, 1000,"data might be corrupt");
}
}
|