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

System.Diagnostics.Debug.Assert Method

Displays a message if condition is false. [Edit]

[System.Diagnostics.Conditional("DEBUG")]
public static void Assert (bool condition)

Parameters

condition
A boolean condition to check [Edit]

Remarks

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