Class IndexOutOfRangeException
- Namespace
- System
- Assembly
- mscorlib.dll
The exception that is thrown when an attempt is made to access an element of an array with an index that is outside the bounds of the array. This class cannot be inherited.
public class IndexOutOfRangeException : SystemException
- Inheritance
-
IndexOutOfRangeException
- Inherited Members
- Extension Methods
Constructors
IndexOutOfRangeException()
Initializes a new instance of the IndexOutOfRangeException class.
public IndexOutOfRangeException()
IndexOutOfRangeException(string)
Initializes a new instance of the IndexOutOfRangeException class with a specified error message.
public IndexOutOfRangeException(string message)
Parameters
message
stringThe message that describes the error.
IndexOutOfRangeException(string, Exception)
Initializes a new instance of the IndexOutOfRangeException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public IndexOutOfRangeException(string message, Exception innerException)
Parameters
message
stringThe error message that explains the reason for the exception.
innerException
ExceptionThe exception that is the cause of the current exception. If the innerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.