I am trying to find a way to get the sum binary result of checkbox array each time one (or more) array
element is clicked.
e.g.
c(0) = 1, c(1) = 0, c(2) = 1, c(3) = 1... the result is 0xB
Now if c(0) is clicked the result will be 0x3
and so on..
Dim c() As Boolean = Array As Boolean(True, False, True, True)
Dim sum As Int
For i = 1 To c.Length
If c(c.Length - i) = True Then
sum = sum + Bit.ShiftLeft(1, i-1)
End If
Next
Log(sum)
Log(Bit.ToHexString(sum))