Name

BitVector32

Synopsis

This structure defines a lightweight bit vector that can store booleans and 16-bit integers in a 32-bit structure. Sections hold single 16-bit integer values and are the building blocks of a BitVector32. Sections are created with CreateSection(). Each section is constructed with a maximum value for the integer it can hold. Except for the initial section, each subsequent section must provide a reference to the previous section in addition to the maximum value.

The indexer takes two forms. When indexed by a section name, that section’s value can be set or retrieved. When indexed by an integer that specifies a bit in the vector, you can determine whether that bit is set or not (true or false).

Public Structure BitVector32
                  ' Public Constructors
   Public Sub New( ByVal value As BitVector32) 
   Public Sub New( ByVal data As Integer) 
' Public Instance Properties
   Public ReadOnly Property Data As Integer  
   Public Default Property Item(
        ByVal section As Section) As Integer  
   Public Default Property Item(
        ByVal bit As Integer) As Boolean  
' Public Shared Methods
   Public Shared Function CreateMask() As Integer  
   Public Shared Function CreateMask(
        ByVal previous As Integer) As Integer  
   Public Shared Function CreateSection(
        ByVal maxValue As Short) As Section  
   Public Shared Function CreateSection(
        ByVal maxValue As Short, 
        ByVal previous As Section) As Section  
   Public Shared Function ToString(
        ByVal value As BitVector32) As String  
' Public Instance Methods Overrides Public Function ...

Get VB.NET Core Classes in a Nutshell 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.