Convert byte to sbyte - no easy way?

  • Thread starter Thread starter Ray Ackley
  • Start date Start date
R

Ray Ackley

I need to convert a byte to an sbyte - and it has to preserve the
original binary meaning of the 8 bits. For example - a 1111 1111,
which is interpreted as byte to be 255, should show up in the sbyte as
-1. The BitConverter class only takes 2 byte arrays or larger, and
the Convert.ToSByte simply throws an overflow error. Any ideas?

Thanks,
Ray Ackley
 
Back
Top