Debug.WriteLine : Debug « System.Diagnostics « C# / C Sharp by API






Debug.WriteLine

  
#define DEBUG

using System;
using System.Globalization;
using System.Diagnostics;

class MainClass
{
  public static void Main() 
  {
    TextWriterTraceListener tl = new TextWriterTraceListener(Console.Out);
    Debug.Listeners.Add(tl);

    Debug.WriteLine("Starting Main()");

    Debug.Assert(1 == 2, "1==2");

    Debug.WriteLine("Exiting Main()");
  }
}

   
    
  








Related examples in the same category

1.Debug.Assert
2.Debug.Fail
3.Debug.Listeners