sts
    &lt;Test(), ExpectedException("System.Exception")&gt;
      Public Sub ExpectAnExceptionByName()
    &#39; ...
    End Sub
  End Class
End Namespace
</pre>

<pre class="prettyprint mc">#using &lt;Nunit.Framework.dll&gt;
using namespace System;
using namespace NUnit::Framework;

namespace NUnitTests
{
  [TestFixture]
  public __gc class SuccessTests
  {
    [Test]
    [ExpectedException(__typeof(InvalidOperationException))]
    void ExpectAnExceptionByType();

    [Test]
    [ExpectedException(S"Syst