Author: serveruser | Posted on: 9/17/2008 12:23:43 PM | Views : 313

What is System.Diagnostics.Debug.Assert? What does it do, when is it appropriate to use it, and when is it not appropriate?

I found out that using this method caused my test web server to crash. I wanted to find out if this error occurred in development but avoid any unnecessary checks in production. I thought (perhaps mistakenly that Debug.Assert would not run when compiled for release). Even in debug mode however, I didn't want this error to stop everything. Other automated tests cannot continue because of this. Is there a way to avoid this?

...

Go to the complete details ...