"Tyrant Mikey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Well, just about any kind of assertion.
Actually, System.Diagnostics.Debug is far from the only class with an Assert
method...
> Debug.Assert(False)
>
> That should stop the code and display a messagebox detailing the
> assertion. But it doesn't. The text goes to the trace window, but I
> want it to STOP my program. (You know, like an assertion failure SHOULD
> do.)
See
http://www.codeproject.com/aspnet/AS...gAssertion.asp for a way to
implement this. As for your original question of why it doesn't work as
expected automatically, my best guess would be that someone at Microsoft
decided this would probably cause too much pain when applications are
incorrectly deployed with debug configurations (which happens more often
than most of us might like to admit <g>).