C# Decimal Implicit(UInt16 to Decimal)
Description
Decimal Implicit(UInt16 to Decimal)
defines an explicit
conversion of a 16-bit unsigned integer to a Decimal.
Syntax
Decimal.Implicit(UInt16 to Decimal)
has the following syntax.
public static implicit operator decimal (
ushort value
)
Parameters
Decimal.Implicit(UInt16 to Decimal)
has the following parameters.
value
- The 16-bit unsigned integer to convert.
Returns
Decimal.Implicit(UInt16 to Decimal)
method returns The converted 16-bit unsigned integer.
Example
The following example converts UInt16 values to Decimal numbers.
using System;/*from w ww . java 2 s . co m*/
class Example{
public static void Main() {
// Convert value to a Decimal.
Decimal decValue = 40000;
Console.WriteLine(decValue);
}
}
The code above generates the following result.