Application executions can be interrupted with user-defined messages. When assertion occurs, 3 option is provided.
1. Abort: terminate app.
2. Retry: enter break mode
3. Ignore: continue
When the condition parameter evaluates FALSE, Assertion is triggered.
Example:
namespace NS_x
{
class CL_x
{
static void Main(string [] args)
{
int x = 0;
for (int i = 0; i < 10; i++)
{
System.Diagnostics.Trace.WriteLine(i);
Console.WriteLine(i);
System.Diagnostics.Debug.Assert(i <9,"i passed 7","details...");
}
}
}
}