BitArray.Item[Int32] 속성

정의

BitArray의 특정 위치에서 비트 값을 가져오거나 설정합니다.

public:
 property bool default[int] { bool get(int index); void set(int index, bool value); };
public bool this[int index] { get; set; }
member this.Item(int) : bool with get, set
Default Public Property Item(index As Integer) As Boolean

매개 변수

index
Int32

가져오거나 설정할 값의 0부터 시작하는 인덱스입니다.

속성 값

index 위치의 비트 값입니다.

예외

index가 0보다 작은 경우

또는

indexCount보다 크거나 같은 경우

설명

이 속성은 myCollection[index] 구문을 사용하여 컬렉션의 특정 요소에 액세스하는 기능을 제공합니다.

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

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

적용 대상

추가 정보