System.Collections.BitArray Members

The members of System.Collections.BitArray are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the BitArray class that contains bit values copied from the specified array of Booleans.

Initializes a new instance of the BitArray class that contains bit values copied from the specified array of bytes.

Initializes a new instance of the BitArray class that contains bit values copied from the specified BitArray.

Initializes a new instance of the BitArray class that can hold the specified number of bit values, which are initially set to false.

Initializes a new instance of the BitArray class that contains bit values copied from the specified array of 32-bit integers.

Initializes a new instance of the BitArray class that can hold the specified number of bit values, which are initially set to the specified value.

Public Properties

[read-only]
Countint.

Gets the number of elements contained in the BitArray.

[read-only]
IsReadOnlybool.

Gets a value indicating whether the BitArray is read-only.

[read-only]
IsSynchronizedbool.

Gets a value indicating whether access to the BitArray is synchronized (thread safe).

default property
Item(int)bool. Gets or sets the element at the specified index of the current instance.
Lengthint.

Gets or sets the number of elements in the BitArray.

[read-only]
SyncRootobject.

Gets an object that can be used to synchronize access to the BitArray.

Public Methods

And(BitArray) : BitArray

Performs the bitwise AND operation on the elements in the current BitArray against the corresponding elements in the specified BitArray.

Clone() : object

Creates a shallow copy of the BitArray.

CopyTo(Array, int)

Copies the entire BitArray to a compatible one-dimensional Array, starting at the specified index of the target array.

Get(int) : bool

Gets the value of the bit at a specific position in the BitArray.

GetEnumerator() : IEnumerator

Returns an enumerator that iterates through the BitArray.

Not() : BitArray

Inverts all the bit values in the current BitArray, so that elements set to true are changed to false, and elements set to false are changed to true.

Or(BitArray) : BitArray

Performs the bitwise OR operation on the elements in the current BitArray against the corresponding elements in the specified BitArray.

Set(int, bool)

Sets the bit at a specific position in the BitArray to the specified value.

SetAll(bool)

Sets all bits in the BitArray to the specified value.

Xor(BitArray) : BitArray

Performs the bitwise exclusive OR operation on the elements in the current BitArray against the corresponding elements in the specified BitArray.