A numeric type used to store 8-bit signed integers. sbyte
is an alias for System.SByte
, and takes up 1 byte of memory. For the unsigned equivalent, use byte
.
Valid range is -127
to 127
(the leftover is used to store the sign).
sbyte a = 127; // 127
sbyte b = -127; // -127
sbyte c = 200; // Error, cannot be converted
sbyte d = unchecked((sbyte)129); // -127 (overflows)