System.Convert.ToSByte Method

Converts the value of the specified 8-bit unsigned integer to the equivalent 8-bit signed integer.

Syntax

[System.CLSCompliant(false)]
public static sbyte ToSByte (byte value)

Parameters

value
The 8-bit unsigned integer to convert.

Returns

An 8-bit signed integer that is equivalent to value.

Exceptions

TypeReason
OverflowException value is greater than sbyte.MaxValue.

Remarks

This member is not CLS-compliant. For a CLS-compliant alternative, use Convert.ToInt16(object)(byte).

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0