on( typeof( ArgumentException ), ExpectedMessage="expected message" )]
[ExpectedException( "System.ArgumentException", ExpectedMessage="expected message" )]</pre></div>

<p>With NUnit 2.4, it is possible to specify additional tests on the
exception message, beyond a simple exact match. This is done using the
MatchType named parameter, whose argument is an enumeration, defined as
follows:</p>

<div class="code"><pre class="prettyprint">public enum MessageMatch
{
    /// Expect an exact match
    Exact,
    /