BitArray Class

Represents an array of bits much like the native .NET implementation, however this focuses on providing a free space bit array.

Definition

Namespace: SnapDB.Collections
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public sealed class BitArray
Inheritance
Object    BitArray

Constructors

BitArray Initializes BitArray.

Properties

ClearCount Gets the number of bits that are cleared in this array.
Count Gets the number of bits this array contains.
Item Gets or Sets individual bits in this array.
SetCount Gets the number of bits that are set in this array.

Methods

AreAllBitsCleared Determines if any of the provided bits are cleared.
AreAllBitsSet Determines if any of the provided bits are set.
ClearAll Clears all bits.
ClearBit Clears bit at the specified index.
ClearBits Clears a specified series of bits.
EnsureCapacity Ensures that the bit array has a minimum capacity to accommodate a specified number of bits.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FindClearedBit Finds the position of the next cleared (unset) bit in the bit array.
FindSetBit Finds the position of the next set (1) bit in the bit array.
GetAllClearedBits Returns a yielded list of all bits that are cleared.
GetAllSetBits Returns a yielded list of all bits that are set.
GetBit Gets the status of the corresponding bit.
GetBitUnchecked Gets the status of the corresponding bit. This method does not validate the bounds of the array, and will be Aggressively Inlined.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
SetAll Sets all bits.
SetBit Sets the corresponding bit to true.
SetBits Sets a specified series of bits.
SetCapacity Increases the capacity of the bit array. Decreasing capacity is currently not supported.
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryClearBit Sets the corresponding bit to false. Returns true if the bit state was changed.
TrySetBit Sets the corresponding bit to true. Returns true if the bit state was changed.

Fields

BitsPerElement Defines the number of bits per array element.
BitsPerElementMask Defines the mask to apply to get the bit position of the value.
BitsPerElementShift Defines the number of bits to shift to get the index of the array.

See Also