TraceWriteLineIf : TraceSwitch : Development C# Examples


C# Examples » Development » TraceSwitch »

 

TraceWriteLineIf









    
using  System;
using  System.Collections.Generic;
using  System.Diagnostics;
using  System.Text;


public  class  MainClass
{
        public  static  void  Main()
        {
                TraceSwitch  testTraceSwitch  =  new  TraceSwitch("testTraceSwitch",  "info");
                Trace.WriteLineIf(testTraceSwitch.TraceError,  "Something  bad  happened");
                Trace.WriteLineIf(testTraceSwitch.TraceInfo,  "Some  informational  trace");
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» TraceSwitch