C# Decimal Implicit(Int32 to Decimal)
Description
Decimal Implicit(Int32 to Decimal)
defines an explicit
conversion of a 32-bit signed integer to a Decimal.
Syntax
Decimal.Implicit(Int32 to Decimal)
has the following syntax.
public static implicit operator decimal (
int value
)
Parameters
Decimal.Implicit(Int32 to Decimal)
has the following parameters.
value
- The 32-bit signed integer to convert.
Returns
Decimal.Implicit(Int32 to Decimal)
method returns The converted 32-bit signed integer.
Example
The following example converts Int32 values to Decimal numbers.
//from www .ja v a2 s.c o m
using System;
class Example
{
public static void Main()
{
// Convert each value to a Decimal.
Decimal decValue = 123456789;
Console.WriteLine(decValue);
}
}
The code above generates the following result.