C# Decimal Implicit(SByte to Decimal)
Description
Decimal Implicit(SByte to Decimal)
defines an explicit
conversion of an 8-bit signed integer to a Decimal.
Syntax
Decimal.Implicit(SByte to Decimal)
has the following syntax.
public static implicit operator decimal (
sbyte value
)
Parameters
Decimal.Implicit(SByte to Decimal)
has the following parameters.
value
- The 8-bit signed integer to convert.
Returns
Decimal.Implicit(SByte to Decimal)
method returns The converted 8-bit signed integer.
Example
The following code example converts SByte values to Decimal numbers.
// w w w . j a va 2 s. c o m
using System;
class Example
{
public static void Main()
{
// Convert value to a Decimal.
Decimal decValue = 123;
Console.WriteLine(decValue);
}
}
The code above generates the following result.