/a></li>
        </ul>
    </div><!--/.nav-collapse -->
    </div>
</nav>

  <div class="container">
    <div class="content help">
      <div class="notice">Legacy Documentation. View <a href="https://docs.nunit.org">NUnit 3 Documentation</a></div>
      <div id="help_content">

<h2>Throws Constraint (NUnit 2.5)</h2>

<p><b>ThrowsConstraint</b> is used to test that some code, represented as a delegate,
throws a particular exception. It may be used alone, to merely test the type
of constraint, or with an ad