Trace Related

Today I wrote a vey simple demo to show the use of Trace Relate class, which are all int the namespace System.Diagnostics: Trace, TraceSwitch, TraceListener.

 

App.config

Code

 

Code

Code

 

Whatever, Trace and TraceSwitch are all simple concepts, and are really easy to use. Pay attention to this line of code:

TraceSwitch traceS = new TraceSwitch("traceS", "Application Switch");

The constructor of TraceSwitch will use the info of

posted @ 2008-08-01 18:04  EagleFish(邢瑜琨)  阅读(448)  评论(0编辑  收藏  举报