IndexOutOfRangeException Class
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.
For a list of all members of this type, see IndexOutOfRangeException Members.
System.Object
System.Exception
System.SystemException
System.IndexOutOfRangeException
[Visual Basic] <Serializable> NotInheritable Public Class IndexOutOfRangeException Inherits SystemException [C#] [Serializable] public sealed class IndexOutOfRangeException : SystemException [C++] [Serializable] public __gc __sealed class IndexOutOfRangeException : public SystemException [JScript] public Serializable class IndexOutOfRangeException extends SystemException
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Remarks
The following Microsoft intermediate language (MSIL) instructions throw IndexOutOfRangeException:
- ldelem.<type>
- ldelema
- stelem.<type>
IndexOutOfRangeException uses the HRESULT COR_E_INDEXOUTOFRANGE, which has the value 0x80131508.
For a list of initial property values for an instance of IndexOutOfRangeException, see the IndexOutOfRangeException constructors.
Requirements
Namespace: System
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: Mscorlib (in Mscorlib.dll)
See Also
IndexOutOfRangeException Members | System Namespace | Exception | Handling and Throwing Exceptions