C# BigInteger Add

Description

BigInteger Add Adds two BigInteger values and returns the result.

Syntax

BigInteger.Add has the following syntax.


public static BigInteger Add(
  BigInteger left,
  BigInteger right
)

Parameters

BigInteger.Add has the following parameters.

  • left - The first value to add.
  • right - The second value to add.

Returns

BigInteger.Add method returns The sum of left and right.

Example


using System;//from w  ww.  jav a  2  s  .co m
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
      BigInteger number = BigInteger.Add(Int64.MaxValue, Int32.MaxValue);
      Console.WriteLine("The original value is {0}.", number);


   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex