C# Decimal Decimal(Int32[]) Array
Description
Decimal Decimal(Int32[])
initializes a new instance
of Decimal to a decimal value represented in binary and contained in a specified
array.
Syntax
Decimal.Decimal(Int32[])
has the following syntax.
public Decimal(
int[] bits
)
Parameters
Decimal.Decimal(Int32[])
has the following parameters.
bits
- An array of 32-bit signed integers containing a representation of a decimal value.
Example
The following code example creates several Decimal numbers using the constructor overload that initializes a Decimal structure with an array of four Int32 values.
using System;//from ww w . ja va 2 s. c o m
class DecimalCtorIArrDemo
{
public static void Main( )
{
decimal decimalNum = new decimal( new int[ ] { 0, 0, 0, 0 } );
Console.WriteLine(decimalNum);
}
}
The code above generates the following result.