C# Decimal Explicit(Decimal to Char)
Description
Decimal Explicit(Decimal to Char)
defines an explicit
conversion of a Decimal to a Unicode character.
Syntax
Decimal.Explicit(Decimal to Char)
has the following syntax.
public static explicit operator char (
decimal value
)
Parameters
Decimal.Explicit(Decimal to Char)
has the following parameters.
value
- The value to convert.
Returns
Decimal.Explicit(Decimal to Char)
method returns A Unicode character that represents the converted Decimal.
Example
The following example converts Decimal numbers to Char values (Unicode characters) by using the explicit Decimal to Char conversion.
/* w w w .j av a2s . co m*/
using System;
class Example
{
public static void Main( )
{
char charValue = (char) 77.7m;
Console.WriteLine(charValue);
}
}
The code above generates the following result.