title: Where/how to store or handle a lot of custom exceptions?
body: <p>Lets say I would like to make some custom exceptions. And I would like to have more of them. I could create for every new exception a new class, but is there another way to do this? And if I have to create always a new class, where to store them? Its just looking not that nice in the root folder of a project.</p>
  
  <p>Ahm and another question: what am I doing if some exceptions are the same, just the name of the exception is changing a little bit? Lets say exception A is looking like this:</p>
  
  <pre><code>    [Serializable()]
      public class ExceptionA: Exception, ISerializable
      {
          public ExceptionA() : base() { }
          public ExceptionA(string message) : base(message) { }
          public ExceptionA(string message, System.Exception inner) : base(message, inner) { }
          public ExceptionA(SerializationInfo info, StreamingContext context) : base(info, context) { }
      }
  }
  </code></pre>
  
  <p>and another one is the same, just another name:</p>
  
  <pre><code>    [Serializable()]
      public class ExceptionB: Exception, ISerializable
      {
          public ExceptionB() : base() { }
          public ExceptionB(string message) : base(message) { }
          public ExceptionB(string message, System.Exception inner) : base(message, inner) { }
          public ExceptionB(SerializationInfo info, StreamingContext context) : base(info, context) { }
      }
  }
  </code></pre>
  
  <p>And so on. Do I really have to create <strong>always</strong> a new class and paste the same code? Any suggestions?</p>