title: When should I use Debug.Assert()?
body: <p>I've been a professional software engineer for about a year now, having graduated with a CS degree. I've known about assertions for a while in C++ and C, but had no idea they existed in C# and .NET at all until recently.</p>
  
  <p>Our production code contains no asserts whatsoever and my question is this...</p>
  
  <p>Should I begin using Asserts in our production code? And if so, When is its use most appropriate? Would it make more sense to do</p>
  
  <pre><code>Debug.Assert(val != null);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if ( val == null )
      throw new exception();
  </code></pre>