How do I do a right and left shift in vb.net?

Sylonious

Freshman
Joined
Apr 12, 2003
Messages
27
C#:
(data[position++] << 8)
vb.NET?
How do I do a right shift and a left shift like this one in vb.net?
BThumb.jpg
 
Divide by two is the same as shifting the bits right once, multiply by two is the same as shifting left once.

If you have VB.NET 2003, however, VB has << and >> operators.
 
The / 256 part is right, but you can't do

data[position++] in VB. :p


Visual Basic:
... data(position) / 256
position += 1
 
Back
Top