title: Is there a way to throw custom exception without Exception class
body: <p>Is there any way in C# (i.e. in .NET) to throw a custom exception but without writing all the code to define your own exception class derived from <code>Exception</code>?</p>
  
  <p>I am thinking something similar you have for example in Oracle PL/SQL where you can simply write</p>
  
  <pre><code>raise_application_error(-20001, 'An arbitary error message');
  </code></pre>
  
  <p>at any place.</p>