I have this piece of code in C#:
Here is the VB code:
But the VB code is throwing the following error:
Value of type 'Integer' cannot be converted to 'UShort'.
Any ideas why I am getting it ? I was stumped because the C# code is not throwing that error!
Thanks in advance :wave:
vb.net Code:
return ((UInt16)(((0xFF00 & input) >> 8) | ((0x00FF & input) << 8)));
Here is the VB code:
vb.net Code:
Return DirectCast(((&HFF00 And input) >> 8) Or ((&H00FF And input) << 8), UInt16)
But the VB code is throwing the following error:
Quote:
Value of type 'Integer' cannot be converted to 'UShort'.
Thanks in advance :wave: