C# Decimal Decimal(Int64)
Description
Decimal Decimal(Int64)
initializes a new instance of
Decimal to the value of the specified 64-bit signed integer.
Syntax
Decimal.Decimal(Int64)
has the following syntax.
public Decimal(
long value
)
Parameters
Decimal.Decimal(Int64)
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 an Int64 value.
using System;/*from www . j a v a2 s .c o m*/
class DecimalCtorLDemo
{
public static void Main( )
{
decimal decimalNum = new decimal( 999999999999999999 );
Console.WriteLine( decimalNum );
}
}
The code above generates the following result.