C# BigInteger LessThan(Int64, BigInteger)

Description

BigInteger LessThan(Int64, BigInteger) Returns a value that indicates whether a 64-bit signed integer is less than a BigInteger value.

Syntax

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


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

Parameters

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

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

Returns

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

Example


//w ww .j ava  2  s  .c  om
using System;
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        BigInteger number = BigInteger.Parse("123123123123");
        Console.WriteLine(Int64.MaxValue < number);
    
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex