How do I bitwise shift right/left in VB.NET? Does it even have operators for this, or do I have to use some utility method?
VB.NET has had bit shift operators (<< and >>) since 2003.
You can use the << and >> operators, and you have to specify how many bits to shift.
myFinal = myInteger << 4 ' Shift LEFT by 4 bits.
myFinal = myInteger >> 4 ' Shift RIGHT by 4 bits.
You can also use it as a unary operator...
myFinal <<= 4 ' Shift myFinal LEFT by 4 bits, storing the result in myFinal.
myFinal >>= 4 ' Shift myFinal RIGHT by 4 bits, storing the result in myFinal.