Manages an array of bit values, which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0).
More...
Inherits ICollection, IEnumerable, and ICloneable.
Manages an array of bit values, which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0).
◆ FsBitArray() [1/7]
Initializes a new instance of the FsBitArray class that can hold the specified number of bit values, which are initially set to false.
- Parameters
-
length | The number of bit values in the new FsBitArray. |
◆ FsBitArray() [2/7]
Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of bytes.
- Parameters
-
bytes | An array of bytes containing the values to copy, where each byte represents eight consecutive bits. |
◆ FsBitArray() [3/7]
Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of Booleans.
- Parameters
-
values | An array of Booleans to copy. |
◆ FsBitArray() [4/7]
Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of 32-bit integers.
- Parameters
-
values | An array of integers containing the values to copy, where each integer represents 32 consecutive bits. |
◆ FsBitArray() [5/7]
Initializes a new instance of the FsBitArray class that contains bit values copied from the specified System.Collections.BitArray.
- Parameters
-
bits | The System.Collections.BitArray to copy. |
◆ FsBitArray() [6/7]
Initializes a new instance of the FsBitArray class that contains bit values copied from the specified FsBitArray.
- Parameters
-
◆ FsBitArray() [7/7]
Initializes a new instance of the FsBitArray class that can hold the specified number of bit values, which are initially set to the specified value.
- Parameters
-
length | The number of bit values in the new FsBitArray. |
defaultValue | The Boolean value to assign to each bit. |
◆ And()
Performs the bitwise AND operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.
- Parameters
-
value | The FsBitArray with which to perform the bitwise AND operation. |
- Returns
- The current instance after the bitwise AND operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.
◆ Clone()
◆ CopyTo()
void CopyTo |
( |
Array |
array, |
|
|
int |
index |
|
) |
| |
|
inline |
Copies the entire FsBitArray to a compatible one-dimensional System.Array, starting at the specified index of the target array.
- Parameters
-
array | The one-dimensional System.Array that is the destination of the elements copied from FsBitArray. The System.Array must have zero-based indexing. |
index | The zero-based index in array at which copying begins. |
◆ Get()
Gets the value of the bit at a specific position in the FsBitArray.
- Parameters
-
index | The zero-based index of the value to get. |
- Returns
- The value of the bit at position index.
◆ GetEnumerator()
IEnumerator GetEnumerator |
( |
| ) |
|
|
inline |
Returns an enumerator that iterates through the FsBitArray.
- Returns
- An System.Collections.IEnumerator for the entire FsBitArray.
◆ HasChanged()
bool HasChanged |
( |
int |
Index | ) |
|
|
inline |
◆ Not()
Inverts all the bit values in the current FsBitArray, so that elements set to true are changed to false, and elements set to false are changed to true.
- Returns
- The current instance with inverted bit values.
◆ Or()
Performs the bitwise OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.
- Parameters
-
value | The FsBitArray with which to perform the bitwise OR operation. |
- Returns
- The current instance after the bitwise OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.
◆ Set()
void Set |
( |
int |
index, |
|
|
bool |
value |
|
) |
| |
|
inline |
Sets the bit at a specific position in the FsBitArray to the specified value.
- Parameters
-
index | The zero-based index of the bit to set. |
value | The Boolean value to assign to the bit. |
◆ SetAll()
void SetAll |
( |
bool |
value | ) |
|
|
inline |
Sets all bits in the FsBitArray to the specified value.
- Parameters
-
value | The Boolean value to assign to all bits. |
◆ Xor()
Performs the bitwise exclusive OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.
- Parameters
-
value | The FsBitArray with which to perform the bitwise exclusive OR operation. |
- Returns
- The current instance after the bitwise exclusive OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.
◆ BitArray
Returns the underlying native, .NET System.Collections.BitArray associated with this FsBitArray
◆ Changed
◆ Count
Gets the number of elements contained in the FsBitArray.
◆ IsReadOnly
Gets a value indicating whether the FsBitArray is read-only.
◆ IsSynchronized
Gets a value indicating whether access to the FsBitArray is synchronized (thread safe).
◆ Length
Gets or sets the number of elements in the FsBitArray.
◆ SyncRoot
Gets an object that can be used to synchronize access to the FsBitArray.
◆ this[int index]
Gets or sets the value of the bit at a specific position in the FsBitArray.
- Parameters
-
index | The zero-based index of the value to get or set. |
- Returns
- The value of the bit at position index.