C# BigInteger LessThanOrEqual(BigInteger, Int64)

Description

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

Syntax

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


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

Parameters

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

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

Returns

BigInteger.LessThanOrEqual(BigInteger, Int64) method returns true if left is less than or equal to right; otherwise, false.

Example


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

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

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex