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

System.Diagnostics.Trace.WriteLineIf Method

If condition is true, send message and its category category to all System.Diagnostics.TraceListener objects in the Trace.Listeners collection.

[System.Diagnostics.Conditional("TRACE")]
public static void WriteLineIf (bool condition, object value, string category)

Parameters

condition
Whether to display value
value
An object to display
category
The message category

Remarks

If condition is true, invoke the TraceListener.WriteLine(object, string) method on all System.Diagnostics.TraceListener objects in the Trace.Listeners collection.

Requirements

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