Exception caused by attempting to use an index out of the allowed range. This can be created by the engine when it is trying to use an index on an array beyond its range. For example, a negative number, or a positive one larger than or equal to the length of the array, will cause this exception. A user may also create this exception pre-emptively as part of the argument check.
Parent Class
Type | Name | Signature |
---|---|---|
constructor | ArrayOutOfRangeException | public ArrayOutOfRangeException(int, int) |
public ArrayOutOfRangeException(int index, int max)
Create a standard ArrayOutOfRangeException instance. The message for this exception is fixed.
Parameters