C# Decimal Implicit(Char to Decimal)
Description
Decimal Implicit(Char to Decimal)
defines an explicit
conversion of a Unicode character to a Decimal.
Syntax
Decimal.Implicit(Char to Decimal)
has the following syntax.
public static implicit operator decimal (
char value
)
Parameters
Decimal.Implicit(Char to Decimal)
has the following parameters.
value
- The Unicode character to convert.
Returns
Decimal.Implicit(Char to Decimal)
method returns The converted Unicode character.
Example
The following example converts Char values (Unicode characters) to Decimal numbers.
using System;/*from www .j a v a 2 s. c om*/
class Example
{
public static void Main()
{
// Convert each Char value to a Decimal.
decimal decValue = 123;
Console.WriteLine(decValue);
}
}
The code above generates the following result.