Mono Class Library: System.Convert Overview | Members

System.Convert.ToSByte Method

Converts a int to a sbyte .

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

Parameters

value
The 32-bit signed integer value to be converted.

Returns

value as a sbyte.

Exceptions

TypeReason
OverflowExceptionvalue is greater than sbyte.MaxValue or less than sbyte.MinValue.

Remarks

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

Requirements

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