C# BigInteger LessThan(BigInteger, BigInteger)

Description

BigInteger LessThan(BigInteger, BigInteger) Returns a value that indicates whether a BigInteger value is less than another BigInteger value.

Syntax

BigInteger.LessThan(BigInteger, BigInteger) has the following syntax.


public static bool operator <(
  BigInteger left,
  BigInteger right
)

Parameters

BigInteger.LessThan(BigInteger, BigInteger) has the following parameters.

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

Returns

BigInteger.LessThan(BigInteger, BigInteger) method returns true if left is less than right; otherwise, false.

Example


//from  w  w  w  .j a va 2 s.co m
using System;
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        BigInteger number1 = 1231231231;
        BigInteger number2 = 1231231233;
        BigInteger number3 = 12312312312;
        Console.WriteLine(number1 < number2);         
        Console.WriteLine(number1 < number3);          
            
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex