BitArray 成员

管理位值的压缩数组,该值表示为布尔值,其中 true 表示位是打开的 (1),false 表示位是关闭的 (0)。

下表列出了由 BitArray 类型公开的成员。

公共构造函数

  名称 说明
Public method Supported by the .NET Compact Framework BitArray 已重载。初始化 BitArray 类的新实例,可指定该实例的容量和初始值。

页首

公共属性

  名称 说明
Public property Supported by the .NET Compact Framework Count 获取 BitArray 中包含的元素数。
Public property Supported by the .NET Compact Framework IsReadOnly 获取一个值,该值指示 BitArray 是否为只读。
Public property Supported by the .NET Compact Framework IsSynchronized 获取一个值,该值指示是否同步对 BitArray 的访问(线程安全)。
Public property Supported by the .NET Compact Framework Item 获取或设置 BitArray 中特定位置的位的值。
Public property Supported by the .NET Compact Framework Length 获取或设置 BitArray 中元素的数目。
Public property Supported by the .NET Compact Framework SyncRoot 获取可用于同步 BitArray 访问的对象。

页首

公共方法

  名称 说明
Public method Supported by the .NET Compact Framework And 对当前 BitArray 中的元素和指定的 BitArray 中的相应元素执行按位 AND 运算。
Public method Supported by the .NET Compact Framework Clone 创建 BitArray 的浅表副本。
Public method Supported by the .NET Compact Framework CopyTo 从目标数组的指定索引处开始将整个 BitArray 复制到兼容的一维 Array
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework Get 获取 BitArray 中特定位置处的位的值。
Public method Supported by the .NET Compact Framework GetEnumerator 返回循环访问 BitArray 的枚举数。
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework Not 反转当前 BitArray 中的所有位值,以便将设置为 true 的元素更改为 false;将设置为 false 的元素更改为 true
Public method Supported by the .NET Compact Framework Or 对当前 BitArray 中的元素和指定的 BitArray 中的相应元素执行按位“或”运算。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework Set BitArray 中特定位置处的位设置为指定值。
Public method Supported by the .NET Compact Framework SetAll BitArray 中的所有位设置为指定值。
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework Xor 对当前 BitArray 中的元素和指定的 BitArray 中的相应元素执行按位“异或”运算。

页首

请参见

参考

BitArray 类
System.Collections 命名空间
System.Collections.Generic