BitVector32.Item[] プロパティ

定義

指定したセクションまたはビット フラグの値を取得または設定します。

オーバーロード

名前 説明
Item[BitVector32+Section]

指定した BitVector32.Sectionに格納されている値を取得または設定します。

Item[Int32]

指定したマスクによって示されるビット フラグの状態を取得または設定します。

Item[BitVector32+Section]

指定した 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.SectionBitVector32のウィンドウであり、CreateSectionで指定された最大値を含むことができる連続する最小ビット数で構成されます。 たとえば、最大値が 1 のセクションは 1 ビットのみで構成され、最大値が 5 のセクションは 3 つのビットで構成されます。 最大値が 1 の BitVector32.Section を作成してブール値として使用できるため、整数とブール値を同じ BitVector32に格納できます。

C# 言語では、Item[] プロパティを実装する代わりに、このキーワードを使用してインデクサーを定義します。 Visual Basicは、Item[]default プロパティとして実装します。このプロパティは、同じインデックス作成機能を提供します。

このプロパティの値の取得は O(1) 操作です。プロパティの設定も O(1) 操作です。

こちらもご覧ください

適用対象

Item[Int32]

指定したマスクによって示されるビット フラグの状態を取得または設定します。

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

取得または設定するビットを示すマスク。

プロパティ値

true 指定したビット フラグがオンの場合 (1);それ以外の場合は false

注釈

Item[] [Section] プロパティはセクションとして設定されるBitVector32のインデクサーであり、Item[] [int] プロパティはビット フラグとして設定されるBitVector32のインデクサーです。

セクションとして設定されている BitVector32 でこのプロパティを使用すると、予期しない結果が発生する可能性があります。

C# 言語では、Item[] プロパティを実装する代わりに、このキーワードを使用してインデクサーを定義します。 Visual Basicは、Item[]default プロパティとして実装します。このプロパティは、同じインデックス作成機能を提供します。

このプロパティの値の取得は O(1) 操作です。プロパティの設定も O(1) 操作です。

こちらもご覧ください

適用対象