force asp.net assert to throw an exception?
My asserts aren't generating message boxes, sometimes they send a message to debug output and end the thread without giving me a开发者_高级运维 more aggressive notification. How can I force all my Debug.Asserts to just throw, so I know that I see them?
We created our own asserts that throw.
It should throw if you haven't disabled it using <assert assertuienabled="false"/>
in <system.diagnostics>
section.
精彩评论