I still don't use .net, so I don't know the NEW, IMPROVED syntax of it all...
(VB6 'till the end!!!)
x = bit position to be set to a 1
y = value in which a bit is to be set
y = y + ( 2 ^ x )
or
y = y OR ( 2 ^ x )
If you're bit is at position 11, then your value is 2 ^ 11, or 2048 (2^11)...
If the original value is 47 00000101111
and you add 2048 (2 ^11)
you get
2095 or 100000101111
Bookmarks