I have this piece of code in C#:
vb.net Code:
  1. return ((UInt16)(((0xFF00 & input) >> 8) | ((0x00FF & input) << 8)));

Here is the VB code:
vb.net Code:
  1. Return DirectCast(((&HFF00 And input) >> 8) Or ((&H00FF And input) << 8), UInt16)

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