Mono Class Library: System.Convert Overview | Members

System.Convert.ToByte Method

Converts a sbyte to a byte . [Edit]

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

Parameters

value
The 8-bit signed integer to be converted. [Edit]

Returns

value as a byte. [Edit]

Exceptions

TypeReason
OverflowExceptionvalue is less than byte.MinValue. [Edit]

Remarks

This member is not CLS-compliant. For a CLS-compliant alternative, use Convert.ToByte(object)(short). [Edit]

Requirements

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