BitVector32.Item[] 속성

정의

지정된 섹션이나 비트 플래그의 값을 가져오거나 설정합니다.

오버로드

Item[BitVector32+Section]

지정된 BitVector32.Section에 저장된 값을 가져오거나 설정합니다.

Item[Int32]

지정된 마스크가 나타내는 비트 플래그의 상태를 가져오거나 설정합니다.

Item[BitVector32+Section]

Source:
BitVector32.cs
Source:
BitVector32.cs
Source:
BitVector32.cs

지정된 BitVector32.Section에 저장된 값을 가져오거나 설정합니다.

public:
 property int default[System::Collections::Specialized::BitVector32::Section] { int get(System::Collections::Specialized::BitVector32::Section section); void set(System::Collections::Specialized::BitVector32::Section section, int value); };
public int this[System.Collections.Specialized.BitVector32.Section section] { get; set; }
member this.Item(System.Collections.Specialized.BitVector32.Section) : int with get, set
Default Public Property Item(section As BitVector32.Section) As Integer

매개 변수

section
BitVector32.Section

가져오거나 설정할 값이 들어 있는 BitVector32.Section입니다.

속성 값

지정된 BitVector32.Section에 저장된 값입니다.

설명

Item[] [Section] 속성은 섹션으로 설정된 의 인덱서 BitVector32 이고 Item[] [int] 속성은 비트 플래그로 설정된 의 인덱서 BitVector32 입니다.

BitVector32.Section 은 의 BitVector32 창이며 에 지정된 최대값을 포함할 수 있는 가장 적은 수의 연속 비트로 구성됩니다CreateSection. 예를 들어 최대값이 1인 섹션은 1비트만 구성되는 반면, 최대값이 5인 섹션은 3비트로 구성됩니다. 최대값이 1인 을 BitVector32.Section 만들어 부울로 사용할 수 있으므로 같은 BitVector32에 정수와 부울을 저장할 수 있습니다.

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

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

추가 정보

적용 대상

Item[Int32]

Source:
BitVector32.cs
Source:
BitVector32.cs
Source:
BitVector32.cs

지정된 마스크가 나타내는 비트 플래그의 상태를 가져오거나 설정합니다.

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

매개 변수

bit
Int32

가져오거나 설정할 비트를 나타내는 마스크입니다.

속성 값

지정된 비트 플래그가 (1)에 있으면 true이고, 그렇지 않으면 false입니다.

설명

Item[] [Section] 속성은 섹션으로 설정된 의 인덱서 BitVector32 이고 Item[] [int] 속성은 비트 플래그로 설정된 의 인덱서 BitVector32 입니다.

섹션으로 설정된 에서 BitVector32 이 속성을 사용하면 예기치 않은 결과가 발생할 수 있습니다.

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

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

추가 정보

적용 대상