using System; using System.IO; using System.Diagnostics; class MainClass { [STAThread] static void Main(string[] args) { Trace.Listeners.Add(new TextWriterTraceListener(Console.Out)); Trace.WriteLine("My Trace to the console"); } }