C# BigInteger LessThanOrEqual(BigInteger, BigInteger)

Description

BigInteger LessThanOrEqual(BigInteger, BigInteger) Returns a value that indicates whether a BigInteger value is less than or equal to another BigInteger value.

Syntax

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


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

Parameters

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

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

Returns

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

Example


//  w w  w  .  j a  v a  2  s.  com
using System;
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        BigInteger number1 = 123123123;
        BigInteger number2 = 123123123;
        BigInteger number3 = 312231233;
        BigInteger number4 = 123123123;
        Console.WriteLine(number1 <= number2);            
        Console.WriteLine(number1 <= number3);           
        Console.WriteLine(number1 <= number4);           
            
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex