I'm a moderate fan of using Exception subtypes to help describe the problem that caused the exception. For instance, let's say that I'm writing a method that does not allow int values greater than 100 to be passed in as arguments. I'll often start the method with a condition to guard against this, and throw an exception if it occurs. I'll probably throw a System.Argument exception (with an appropriate message, inner exception, and Data) to indicate this.
Right now I have a class which has two properties. For the object to be considered "valid", exactly one of these properties must have a non-null value, and the other one must be null. I happen to have a defect case where this isn't true, and I want to throw an exception when this is detected.
My question is: what is the best Exception subclass to use in this case? I don't see an (Invalid)StateException subclass. ApplicationException is the obvious fallback choice, but it's very generic and so I'm hoping for something better.
My particular interest at the moment is in .NET Exception subclasses, but since this same problem applies to multiple languages I wouldn't consider discussions of other language solutions to be too off-topic. For instance: Java has IllegalStateException which seems to describe my needs perfectly. I've also favorited a similar question for Ruby.