Represents an exception that is thrown when the argument is outside the allowed values of the method that is invoked.
Object
Exception
SystemException
ArgumentException
ArgumentOutOfRangeException
[Visual Basic] Public Class ArgumentOutOfRangeException Inherits ArgumentException [C#] public class ArgumentOutOfRangeException : ArgumentException [C++] public __gc class ArgumentOutOfRangeException : public ArgumentException [JScript] public class ArgumentOutOfRangeException extends ArgumentException
ArgumentOutOfRangeException is thrown when a method is invoked and one of the arguments passed to that method is outside the expected range values. This is usually the result of an attempt to access an object with an index that is outside the lower and upper bounds or range of indices.
This exception is used extensively by:
Namespace: System
Assembly: mscorlib.dll