C# Decimal ToSByte
Description
Decimal ToSByte
converts the value of the specified Decimal
to the equivalent 8-bit signed integer.
Syntax
Decimal.ToSByte
has the following syntax.
[CLSCompliantAttribute(false)]
public static sbyte ToSByte(
decimal value
)
Parameters
Decimal.ToSByte
has the following parameters.
value
- The decimal number to convert.
Returns
Decimal.ToSByte
method returns An 8-bit signed integer equivalent to value.
Example
The following example uses the ToSByte method to convert decimal numbers to SByte values.
/*from www.java 2 s .c o m*/
using System;
class Example
{
public static void Main( )
{
sbyte number = Decimal.ToSByte(78.999m);
Console.WriteLine(number);
}
}
The code above generates the following result.