C# BigInteger BigInteger(UInt64)

Description

BigInteger BigInteger(UInt64) Initializes a new instance of the BigInteger structure with an unsigned 64-bit integer value.

Syntax

BigInteger.BigInteger(UInt64) has the following syntax.


[CLSCompliantAttribute(false)]
public BigInteger(
  ulong value
)

Parameters

BigInteger.BigInteger(UInt64) has the following parameters.

  • value - An unsigned 64-bit integer.

Example


using System;// www . j a v  a2s .com
using System.Numerics;

public class Example
{
   public static void Main()
   {
        ulong unsignedValue = UInt64.MaxValue;
        BigInteger number = new BigInteger(unsignedValue);
        Console.WriteLine(number.ToString("N0"));       
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex