C# BigInteger Implicit(Int64 to BigInteger)

Description

BigInteger Implicit(Int64 to BigInteger) Defines an implicit conversion of a signed 64-bit integer to a BigInteger value.

Syntax

BigInteger.Implicit(Int64 to BigInteger) has the following syntax.


public static implicit operator BigInteger (
  long value
)

Parameters

BigInteger.Implicit(Int64 to BigInteger) has the following parameters.

  • value - The value to convert to a BigInteger.

Returns

BigInteger.Implicit(Int64 to BigInteger) method returns An object that contains the value of the value parameter.

Example


using System;/*from  w w w .  j  a  v a  2 s . c  o m*/
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        long longValue = 123123123123;
        BigInteger number = longValue;
        number = number + (longValue / 2);
        Console.WriteLine(number * longValue / longValue); // Displays 2038132473

    
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex