This documentation is archived and is not being maintained.

SByte Data Type (Visual Basic)

Holds signed 8-bit (1-byte) integers that range in value from -128 through 127.

Use the SByte data type to contain integer values that do not require the full data width of Integer or even the half data width of Short. In some cases the common language runtime might be able to pack your SByte variables closely together and save memory consumption.

The default value of SByte is 0.

Programming Tips

  • CLS Compliance. The SByte data type is not part of the Language Independence and Language-Independent Components (CLS), so CLS-compliant code cannot consume a component that uses it.

  • Widening. The SByte data type widens to Short, Integer, Long, Decimal, Single, and Double. This means you can convert SByte to any of these types without encountering a System.OverflowException error.

  • Type Characters. SByte has no literal type character or identifier type character.

  • Framework Type. The corresponding type in the .NET Framework is the System.SByte structure.