oxfc
is negative but I have it as a byte
and its value is 252, is there any way to convert it to signed byte
or int
?
I found this method:
(BitConverter.ToInt16(new byte[2] { 0, 0xfc }, 0) / 256).ToString()
But is there any better way?
You can simply cast it:
byte b = 0xfc;
sbyte s = unchecked((sbyte)b);