C#: Convert Byte to SByte
By admin on Jan 24, 2010 in .NET, Programming
Here is a simple way to convert SByte to Byte in C#. E.g. if you want to convert the value of 129 from data type Byte to –127 in SByte
1: byte byteValue = 129;
2: sbyte sb = unchecked((sbyte)byteValue);
3: Console.WriteLine(sb);
Sorry, comments for this entry are closed at this time.