I have a BitArray of 8 bits and I want to know the total value of the bits as if it were a byte.
I'd like to now put them 8 bits (1 byte) into a byte varible, something like:Code:Dim Mask As New BitArray(8, True) Mask(0) = False
Then in the above example MyByte would = 254Code:Dim MyByte as byte = mask
Basically, assigning the 8 bits to a byte and being able to get the total value of that byte (which in this case would be the total of the 8 bits).




Reply With Quote