title: How to hide the current method from exception stack trace in .NET?
body: <p>I'd like to know if there is a way to throw an exception from inside a method, but to not include that method in the exception stack trace.  E.g.</p>
  
  <pre><code>void ThrowSomeException()
  {
      throw new SomeException();
  }
  </code></pre>
  
  <p>And then, if I call that method from a method called <code>Foo()</code> I want the exception stack trace to start with <code>at Foo()</code>, not <code>at ThrowSomeException()</code>.  I assume if this was possible it might be through the use of attributes on the method.</p>
  
  <p>I'm interested in the general answer, but in case this isn't possible, what I'm really trying to do is create an extension method <code>AssertEqual()</code> for <code>IEnumerable</code> that I'll use in NUnit tests.  So when I call <code>myEnumerable.AssertEqual(otherEnumerable)</code> and it fails, NUnit should report the error inside the test method, not inside the extension method.</p>
  
  <p>Thanks!</p>