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

System.Diagnostics.Trace.Assert Method

Displays message and detailMessage if condition is false.

[System.Diagnostics.Conditional("TRACE")]
public static void Assert (bool condition, string message, string detailMessage)

Parameters

condition
A boolean condition to check
message
A message to display
detailMessage
A more detailed message to display

Remarks

If condition is false, then TraceListener.Fail(string, string) is invoked 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