다음을 통해 공유


IndexOutOfRangeException 클래스

해당 배열 범위 외부에 있는 인덱스를 사용하여 배열의 요소에 액세스하려고 할 때 throw되는 예외입니다. 이 클래스는 상속될 수 없습니다.

네임스페이스: System
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class IndexOutOfRangeException
    Inherits SystemException
‘사용 방법
Dim instance As IndexOutOfRangeException
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public sealed class IndexOutOfRangeException : SystemException
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public ref class IndexOutOfRangeException sealed : public SystemException
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class IndexOutOfRangeException extends SystemException
SerializableAttribute 
ComVisibleAttribute(true) 
public final class IndexOutOfRangeException extends SystemException

설명

다음 MSIL(Microsoft Intermediate Language) 명령은 IndexOutOfRangeException을 throw합니다.

  • ldelem.<type>

  • ldelema

  • stelem.<type>

IndexOutOfRangeException은 0x80131508 값을 가지는 HRESULT COR_E_INDEXOUTOFRANGE를 사용합니다.

이 예외의 가장 일반적인 원인은 조회 인덱스를 잘못 계산하거나 반복할 때 잘못된 시작점이나 끝점을 사용하는 것입니다. 다른 원인은 예외 문제 해결: System.IndexOutOfRangeException을 참조하십시오.

IndexOutOfRangeException 인스턴스의 초기 속성 값 목록에 대한 자세한 내용은 IndexOutOfRangeException 생성자를 참조하십시오.

상속 계층 구조

System.Object
   System.Exception
     System.SystemException
      System.IndexOutOfRangeException

스레드로부터의 안전성

이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

IndexOutOfRangeException 멤버
System 네임스페이스
Exception 클래스

기타 리소스

예외 처리 및 Throw