C#: Value does not fall within the expected range

Categories Programming

To save anybody from a fruitless internet search, the default message for ArgumentException is the phrase “Value does not fall within the expected range”. This error may be returned from various sources, but in my case it was an explicit throw:


if (someInvalidValue)
{
throw new ArgumentException();
}

So if this error is bubbling up, it’s an ArgumentException.

Comments

Leave a Comment

Note: Spam comments are submitted to Google as spam links, usually resulting in blacklisting: https://www.google.com/webmasters/tools/spamreport

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>