C# Decimal Implicit(Int16 to Decimal)
Description
Decimal Implicit(Int16 to Decimal)
defines an explicit
conversion of a 16-bit signed integer to a Decimal.
Syntax
Decimal.Implicit(Int16 to Decimal)
has the following syntax.
public static implicit operator decimal (
short value
)
Parameters
Decimal.Implicit(Int16 to Decimal)
has the following parameters.
value
- The16-bit signed integer to convert.
Returns
Decimal.Implicit(Int16 to Decimal)
method returns The converted 16-bit signed integer.
Example
The following example converts Int16 values to Decimal numbers.
//w ww . j a v a2s .c o m
using System;
class Example
{
public static void Main()
{
// Define an array of 16-bit integer values.
Decimal decValue = 12345;
Console.WriteLine(decValue);
}
}
The code above generates the following result.