Debug Assert : Debug « Development « C# / CSharp Tutorial






using System;
using System.Diagnostics;

using System.Collections;

using System.Data;
using System.Text;

public class MainClass{
   public static void Main(){
     Debug.Assert(1 == 0,"Error!","Error: 1 == 0");
   }
}








14.24.Debug
14.24.1.Debug Assert
14.24.2.Add Console.Out to TextWriterTraceListener
14.24.3.Set up a TraceListener to a file
14.24.4.Add EventLogTraceListener to Debug.Listener
14.24.5.Debug and Trace Output
14.24.6.Using Switches to Control Debug and Trace: BooleanSwitch
14.24.7.Using Switches to Control Debug and Trace: TraceSwitch