Converts a Decimal to a, SByte with a specified format.
[Visual Basic] Overloads Public Shared Function ToSByte( _ ByVal value As Decimal _ ) As SByte [C#] public static sbyte ToSByte( Decimal value ); [C++] public: static char ToSByte( Decimal value ); [JScript] public static function ToSByte( value : Decimal ) : SByte;
The Decimal value converted to an SByte.
Exception Type | Condition |
---|---|
OverflowException | is thrown if the resulting integer value is less than SByte.MinValue or greater than SByte.MaxValue. |
The ToSByte method returns an unsigned byte. The Decimal value is rounded toward zero to the nearest integer value and converted to an SByte.
This method implements IConvertible, which replaced IValue. This method is used to obtain the type code for a specified object. (See Convert and Value for more information about conversions; see the Type for more information about types.)
Decimal Structure | Decimal Members | System Namespace | Decimal.ToSByte Overload List