Emits or displays a message for an assertion that always fails.
[Visual Basic] Overloads Public Shared Sub Fail( _ ByVal message As String _ ) [C#] public static void Fail( string message ); [C++] public: static void Fail( String* message ); [JScript] public static function Fail( message : String );
The default behavior is to output the message to a message box when the application is running in a user interface mode, and to the TraceListener instances in the Listeners collection. You can customize this behavior by adding a TraceListener to or removing one from the Listeners collection.
Debug Class | Debug Members | System.Diagnostics Namespace | Debug.Fail Overload List | Debug | Trace | BooleanSwitch | TraceSwitch | TraceListener | DefaultTraceListener | ConditionalAttribute | ConditionalAttribute