BitVector32.Item[] 属性

定义

获取或设置指定节或位标志的值。

重载

名称 说明
Item[BitVector32+Section]

获取或设置存储在指定 BitVector32.Section值中的值。

Item[Int32]

获取或设置指定掩码指示的位标志的状态。

Item[BitVector32+Section]

Source:
BitVector32.cs
Source:
BitVector32.cs
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

包含要获取或设置的值的 A BitVector32.Section

属性值

存储在指定 BitVector32.Section中的值。

注解

Item[] [Section] 属性是设置为节的BitVector32索引器,[Item[]int] 属性是设置为位标志的索引器BitVector32

A BitVector32.Section 是一个窗口, BitVector32 由可包含指定 CreateSection最大值的最小连续位数组成。 例如,最大值为 1 的节仅由一位组成,而最大值为 5 的分区由三位组成。 可以创建 BitVector32.Section 最大值为 1 的布尔值,从而允许将整数和布尔值存储在同 BitVector32一个值中。

C# 语言 使用此关键字来 定义索引器,而不是实现 Item[] 属性。 Visual Basic实现 Item[] 作为 default 属性,它提供相同的索引功能。

检索此属性的值是 O(1) 操作;设置属性也是 O(1) 操作。

另请参阅

适用于

Item[Int32]

Source:
BitVector32.cs
Source:
BitVector32.cs
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

一个掩码,指示要获取或设置的位。

属性值

true 如果指定的位标志位于 (1);否则,为 false.

注解

Item[] [Section] 属性是设置为节的BitVector32索引器,[Item[]int] 属性是设置为位标志的索引器BitVector32

对设置为节的此属性使用此属性 BitVector32 可能会导致意外结果。

C# 语言 使用此关键字来 定义索引器,而不是实现 Item[] 属性。 Visual Basic实现 Item[] 作为 default 属性,它提供相同的索引功能。

检索此属性的值是 O(1) 操作;设置属性也是 O(1) 操作。

另请参阅

适用于