C# BigInteger BigInteger(Single)

Description

BigInteger BigInteger(Single) Initializes a new instance of the BigInteger structure using a single-precision floating-point value.

Syntax

BigInteger.BigInteger(Single) has the following syntax.


public BigInteger(
  float value
)

Parameters

BigInteger.BigInteger(Single) has the following parameters.

  • value - A single-precision floating-point value.

Example


using System;//ww  w .j  ava2  s.c  o  m
using System.Numerics;

public class Example
{
   public static void Main()
   {
        float negativeSingle = Single.MinValue;
        BigInteger negativeNumber = new BigInteger(negativeSingle);
        
        Console.WriteLine(negativeSingle.ToString("N0"));
        Console.WriteLine(negativeNumber.ToString("N0"));
        
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex