C# BigInteger Subtract

Description

BigInteger Subtract Subtracts one BigInteger value from another and returns the result.

Syntax

BigInteger.Subtract has the following syntax.


public static BigInteger Subtract(
  BigInteger left,
  BigInteger right
)

Parameters

BigInteger.Subtract has the following parameters.

  • left - The value to subtract from (the minuend).
  • right - The value to subtract (the subtrahend).

Returns

BigInteger.Subtract method returns The result of subtracting right from left.

Example


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

public class Example
{
   public static void Main()
   {
       BigInteger number = BigInteger.Subtract(Int64.MinValue, Int64.MaxValue);
       Console.WriteLine(number);
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex