阅读背景:

System.Diagnostics.TraceSource中的跟踪输出格式

来源:互联网 

The following code:

以下代码:

static void Main(string[] args)
{
    TraceSource ts = new TraceSource("MyApplication");

    ts.Switch = new SourceSwitch("MySwitch");
    ts.Switch.Level = SourceLevels.All;

    ts.Listeners.Add(new TextWriterTraceListener(Console.Out));

    ts.TraceInformation("Hello World");
    Console.ReadKey();
}
static void Main(



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: