Sylonious Posted June 29, 2003 Posted June 29, 2003 C#: (data[position++] << 8) vb.NET? How do I do a right shift and a left shift like this one in vb.net? http://www.cutv.com/BThumb.jpg Quote
*Experts* Volte Posted June 29, 2003 *Experts* Posted June 29, 2003 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. Quote
Sylonious Posted June 29, 2003 Author Posted June 29, 2003 So (data[position++] ) /256 would be wrong for shifting right 8? Quote
*Experts* Volte Posted June 29, 2003 *Experts* Posted June 29, 2003 The / 256 part is right, but you can't do data[position++] in VB. :p ... data(position) / 256 position += 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.