Mono Class Library: System.Diagnostics.Debug Overview | Members

System.Diagnostics.Debug.WriteIf Method

If condition is true, send a value to all System.Diagnostics.TraceListener objects in the Debug.Listeners collection. [Edit]

[System.Diagnostics.Conditional("DEBUG")]
public static void WriteIf (bool condition, object value)

Parameters

condition
Whether to display value [Edit]
value
An object to display [Edit]

Remarks

If condition is true, invoke the TraceListener.Write(object) method on all System.Diagnostics.TraceListener objects in the Debug.Listeners collection. [Edit]

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0