Jun 28, 2003 #1 S 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?
C#: (data[position++] << 8) vb.NET? How do I do a right shift and a left shift like this one in vb.net?
Jun 28, 2003 #2 V Volte Neutiquam Erro Joined Nov 17, 2002 Messages 2,172 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.
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.
Jun 29, 2003 #3 S Sylonious Freshman Joined Apr 12, 2003 Messages 27 So (data[position++] ) /256 would be wrong for shifting right 8?
Jun 29, 2003 #4 V Volte Neutiquam Erro Joined Nov 17, 2002 Messages 2,172 The / 256 part is right, but you can't do data[position++] in VB. Visual Basic: ... data(position) / 256 position += 1
The / 256 part is right, but you can't do data[position++] in VB. Visual Basic: ... data(position) / 256 position += 1