C# Decimal Decimal(UInt64)
Description
Decimal Decimal(UInt64)
initializes a new instance
of Decimal to the value of the specified 64-bit unsigned integer.
Syntax
Decimal.Decimal(UInt64)
has the following syntax.
[CLSCompliantAttribute(false)]
public Decimal(
ulong value
)
Parameters
Decimal.Decimal(UInt64)
has the following parameters.
value
- The value to represent as a Decimal.
Example
The following code example creates several Decimal numbers using the constructor overload that initializes a Decimal structure with a UInt64 value.
/*from w w w . j a v a 2 s . c om*/
using System;
class DecimalCtorLDemo
{
public static void Main( )
{
decimal decimalNum = new decimal( 999999999999999999 );
Console.WriteLine( decimalNum );
}
}
The code above generates the following result.