The Bitvector32 Collection
System.Collections.Specialized.BitVector32 has basically the same purpose of BitArray but it differs in two important elements; the first one is that BitVector32 is a structure that is a value type and therefore can take advantage of a faster memory allocation. On the other hand, the collection manages only 32-bit integers. All data is stored as 32-bit integers that are effectively affected by changes when you edit the collection. The most important (shared) method is CreateMask that enables creating a mask of bits. The method can create an empty mask (which is typically for the first bit) or create subsequent masks pointing to the previous bit. When done, you can set the bit on or off passing a Boolean value. The following ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access