The Bitvector32 Collection

System.Collections.Specialized.BitVector32 has the same purpose of BitArray but 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 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 by passing a Boolean value. The following code provides ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.