C# Language Diagnostics Debug.WriteLine

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

Writes to the trace listeners in the Listeners collection when the application is compiled in debug configuration.

public static void Main(string[] args)
{
    Debug.WriteLine("Hello");
}

In Visual Studio or Xamarin Studio this will appear in the Application Output window. This is due to the presence of the default trace listener in the TraceListenerCollection.



Got any C# Language Question?