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

System.Diagnostics.Debug.Assert Method

Displays message if condition is false.

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

Parameters

condition
A boolean condition to check
message
A message to display

Remarks

If condition is false, then TraceListener.Fail(string) is invoked on all System.Diagnostics.TraceListener objects in the Debug.Listeners collection.

Requirements

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