Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

sbyte: practical reference

sbyte: practical reference: sbyte is an 8-bit signed integer ranging from -128 through 127.

Version: C# built-in type reference; .NET 10 runtime

Syntax

sbyte value

sbyte is an 8-bit signed integer ranging from -128 through 127.

Use it in interop or a binary format that explicitly requires a signed byte.

Arithmetic promotes it to int, and conversion from byte can change the sign.

Overflow wraps modulo 256 in unchecked context, and the type is not CLS-compliant in every API.

The complete program actually uses sbyte; its exact expected stdout is System.SByte.

Examples

using System;

Console.WriteLine(typeof(sbyte).FullName);

Result

System.SByte

The complete program actually uses `sbyte`; its exact expected stdout is `System.SByte`.

Sources