List<T>.IList.Item[Int32] 속성

정의

지정한 인덱스에 있는 요소를 가져오거나 설정합니다.

property System::Object ^ System::Collections::IList::Item[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };
object System.Collections.IList.Item[int index] { get; set; }
object? System.Collections.IList.Item[int index] { get; set; }
member this.System.Collections.IList.Item(int) : obj with get, set
 Property Item(index As Integer) As Object Implements IList.Item

매개 변수

index
Int32

가져오거나 설정할 요소의 인덱스(0부터 시작)입니다.

속성 값

지정한 인덱스의 요소입니다.

구현

예외

indexIList의 유효한 인덱스가 아닌 경우

속성이 설정되어 있고 value의 형식을 IList에 할당할 수 없는 경우

설명

C# 언어는 키워드(keyword) 사용하여 속성을 구현하는 대신 인덱서를 정의합니다IList.Item[]. Visual Basic에서는 동일한 인덱싱 기능을 제공하는 IList.Item[]을 기본 속성으로 구현합니다.

이 속성의 값을 검색하는 것은 O(1) 작업입니다. 설정 속성은 O(1) 작업이기도 합니다.

적용 대상