BigInteger.LessThanOrEqual Operatore

Definizione

Restituisce un valore che indica se un valore specificato è minore o uguale a un altro valore specificato.

Overload

Nome Descrizione
LessThanOrEqual(BigInteger, UInt64)

Restituisce un valore che indica se un BigInteger valore è minore o uguale a un intero senza segno a 64 bit.

LessThanOrEqual(BigInteger, BigInteger)

Restituisce un valore che indica se un BigInteger valore è minore o uguale a un altro BigInteger valore.

LessThanOrEqual(UInt64, BigInteger)

Restituisce un valore che indica se un intero senza segno a 64 bit è minore o uguale a un BigInteger valore.

LessThanOrEqual(Int64, BigInteger)

Restituisce un valore che indica se un intero con segno a 64 bit è minore o uguale a un BigInteger valore.

LessThanOrEqual(BigInteger, Int64)

Restituisce un valore che indica se un BigInteger valore è minore o uguale a un intero con segno a 64 bit.

LessThanOrEqual(BigInteger, UInt64)

Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs

Importante

Questa API non è conforme a CLS.

Restituisce un valore che indica se un BigInteger valore è minore o uguale a un intero senza segno a 64 bit.

public:
 static bool operator <=(System::Numerics::BigInteger left, System::UInt64 right);
[System.CLSCompliant(false)]
public static bool operator <=(System.Numerics.BigInteger left, ulong right);
[<System.CLSCompliant(false)>]
static member ( <= ) : System.Numerics.BigInteger * uint64 -> bool
Public Shared Operator <= (left As BigInteger, right As ULong) As Boolean

Parametri

left
BigInteger

Primo valore da confrontare.

right
UInt64

Secondo valore da confrontare.

Valori restituiti

true se left è minore o uguale a right; in caso contrario, false.

Attributi

Commenti

Il LessThanOrEqual metodo definisce l'operazione dell'operatore minore o uguale all'operatore per BigInteger i valori. Abilita codice come il seguente:

BigInteger number = BigInteger.Parse("19801324316220166912");
if (number <= UInt64.MaxValue)
{
   // Do something.
}
else
{
   // Do something else.
}
let number = BigInteger.Parse "19801324316220166912"

if number <= UInt64.MaxValue then
    // Do something.
    ()
else
    // Do something else.
    ()
Dim number As BigInteger = BigInteger.Parse("19801324316220166912")
If number <= UInt64.MaxValue Then
   ' Do something.
Else
   ' Do something else.
End If

I linguaggi che non supportano operatori personalizzati possono invece chiamare il BigInteger.CompareTo(UInt64) metodo . Possono anche chiamare direttamente il LessThanOrEqual(BigInteger, UInt64) metodo , come illustrato nell'esempio seguente.

Dim number As BigInteger = BigInteger.Parse("19801324316220166912")
If BigInteger.op_LessThanOrEqual(number, UInt64.MaxValue) Then
   ' Do something.
Else
   ' Do something else.
End If

Il metodo equivalente per questo operatore è BigInteger.CompareTo(UInt64).

Vedi anche

Si applica a

LessThanOrEqual(BigInteger, BigInteger)

Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs

Restituisce un valore che indica se un BigInteger valore è minore o uguale a un altro BigInteger valore.

public:
 static bool operator <=(System::Numerics::BigInteger left, System::Numerics::BigInteger right);
public:
 static bool operator <=(System::Numerics::BigInteger left, System::Numerics::BigInteger right) = System::Numerics::IComparisonOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, bool>::op_LessThanOrEqual;
public static bool operator <=(System.Numerics.BigInteger left, System.Numerics.BigInteger right);
static member ( <= ) : System.Numerics.BigInteger * System.Numerics.BigInteger -> bool
Public Shared Operator <= (left As BigInteger, right As BigInteger) As Boolean

Parametri

left
BigInteger

Primo valore da confrontare.

right
BigInteger

Secondo valore da confrontare.

Valori restituiti

true se left è minore o uguale a right; in caso contrario, false.

Implementazioni

Commenti

Il LessThanOrEqual metodo definisce l'operazione dell'operatore minore o uguale all'operatore per BigInteger i valori. Abilita codice come il seguente:

BigInteger number1 = 945834723;
BigInteger number2 = 345145625;
BigInteger number3 = 945834724;
BigInteger number4 = 945834723;
Console.WriteLine(number1 <= number2);             // Displays False
Console.WriteLine(number1 <= number3);             // Displays True
Console.WriteLine(number1 <= number4);             // Displays True
let number1 = 945834723I
let number2 = 345145625I
let number3 = 945834724I
let number4 = 945834723I
printfn $"{number1 <= number2}" // Displays False
printfn $"{number1 <= number3}" // Displays True
printfn $"{number1 <= number4}" // Displays True
Dim number1 As BigInteger = 945834723
Dim number2 As BigInteger = 345145625
Dim number3 As BigInteger = 945834724 
Dim number4 As BigInteger = 945834723
Console.WriteLine(number1 <= number2)                 ' Displays False
Console.WriteLine(number1 <= number3)                 ' Displays True
Console.WriteLine(number1 <= number4)                 ' Displays True

I linguaggi che non supportano operatori personalizzati possono invece chiamare il Compare metodo . Possono anche chiamare direttamente il LessThanOrEqual(BigInteger, BigInteger) metodo , come illustrato nell'esempio seguente.

Dim numberA As BigInteger = 945834723
Dim numberB As BigInteger = 345145625
Dim numberC As BigInteger = 945834724 
Dim numberD As BigInteger = 945834723
Console.WriteLine( _
        BigInteger.op_LessThanOrEqual(numberA, numberB))    ' Displays False
Console.WriteLine( _
        BigInteger.op_LessThanOrEqual(numberA, numberC))    ' Displays True
Console.WriteLine( _
        BigInteger.op_LessThanOrEqual(numberA, numberD))    ' Displays True

Il metodo equivalente per questo operatore è BigInteger.Compare(BigInteger, BigInteger).

Vedi anche

Si applica a

LessThanOrEqual(UInt64, BigInteger)

Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs

Importante

Questa API non è conforme a CLS.

Restituisce un valore che indica se un intero senza segno a 64 bit è minore o uguale a un BigInteger valore.

public:
 static bool operator <=(System::UInt64 left, System::Numerics::BigInteger right);
[System.CLSCompliant(false)]
public static bool operator <=(ulong left, System.Numerics.BigInteger right);
[<System.CLSCompliant(false)>]
static member ( <= ) : uint64 * System.Numerics.BigInteger -> bool
Public Shared Operator <= (left As ULong, right As BigInteger) As Boolean

Parametri

left
UInt64

Primo valore da confrontare.

right
BigInteger

Secondo valore da confrontare.

Valori restituiti

true se left è minore o uguale a right; in caso contrario, false.

Attributi

Commenti

Il LessThanOrEqual metodo definisce l'operazione dell'operatore minore o uguale all'operatore per BigInteger i valori. Abilita codice come il seguente:

BigInteger number = BigInteger.Parse("9801324316220166912");
if (UInt64.MaxValue <= number)
{
   // Do something.
}
else
{
   // Do something else.
}
let number = BigInteger.Parse "9801324316220166912"

if bigint UInt64.MaxValue <= number then
    // Do something.
    ()
else
    // Do something else.
    ()
Dim number As BigInteger = BigInteger.Parse("9801324316220166912")
If UInt64.MaxValue <= number Then
   ' Do something.
Else
   ' Do something else.
End If

I linguaggi che non supportano operatori personalizzati possono invece chiamare il BigInteger.CompareTo(UInt64) metodo . Possono anche chiamare direttamente il LessThanOrEqual(UInt64, BigInteger) metodo , come illustrato nell'esempio seguente.

Dim number As BigInteger = BigInteger.Parse("9801324316220166912")
If BigInteger.op_LessThanOrEqual(UInt64.MaxValue, number) Then
   ' Do something.
Else
   ' Do something else.
End If

Il metodo equivalente per questo operatore è BigInteger.CompareTo(UInt64).

Vedi anche

Si applica a

LessThanOrEqual(Int64, BigInteger)

Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs

Restituisce un valore che indica se un intero con segno a 64 bit è minore o uguale a un BigInteger valore.

public:
 static bool operator <=(long left, System::Numerics::BigInteger right);
public static bool operator <=(long left, System.Numerics.BigInteger right);
static member ( <= ) : int64 * System.Numerics.BigInteger -> bool
Public Shared Operator <= (left As Long, right As BigInteger) As Boolean

Parametri

left
Int64

Primo valore da confrontare.

right
BigInteger

Secondo valore da confrontare.

Valori restituiti

true se left è minore o uguale a right; in caso contrario, false.

Commenti

Il LessThanOrEqual metodo definisce l'operazione dell'operatore minore o uguale all'operatore per BigInteger i valori. Abilita codice come il seguente:

BigInteger number = BigInteger.Parse("9801324316220166912");
if (Int64.MaxValue <= number)
{
   // Do something.
}
else
{
   // Do something else.
}
let number = BigInteger.Parse "9801324316220166912"

if bigint Int64.MaxValue <= number then
    // Do something.
    ()
else
    // Do something else.
    ()
Dim number As BigInteger = BigInteger.Parse("9801324316220166912")
If Int64.MaxValue <= number Then
   ' Do something.
Else
   ' Do something else.
End If

I linguaggi che non supportano operatori personalizzati possono invece chiamare il BigInteger.CompareTo(Int64) metodo . Possono anche chiamare direttamente il LessThanOrEqual(Int64, BigInteger) metodo , come illustrato nell'esempio seguente.

Dim number As BigInteger = BigInteger.Parse("9801324316220166912")
If BigInteger.op_LessThanOrEqual(Int64.MaxValue, number) Then
   ' Do something.
Else
   ' Do something else.
End If

Se left è un Bytevalore , Int16Int32SByte, , UInt16, o UInt32 , viene convertito in modo implicito in un Int64 valore quando viene eseguita l'operazione.

Il metodo equivalente per questo operatore è BigInteger.CompareTo(Int64).

Vedi anche

Si applica a

LessThanOrEqual(BigInteger, Int64)

Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs
Origine:
BigInteger.cs

Restituisce un valore che indica se un BigInteger valore è minore o uguale a un intero con segno a 64 bit.

public:
 static bool operator <=(System::Numerics::BigInteger left, long right);
public static bool operator <=(System.Numerics.BigInteger left, long right);
static member ( <= ) : System.Numerics.BigInteger * int64 -> bool
Public Shared Operator <= (left As BigInteger, right As Long) As Boolean

Parametri

left
BigInteger

Primo valore da confrontare.

right
Int64

Secondo valore da confrontare.

Valori restituiti

true se left è minore o uguale a right; in caso contrario, false.

Commenti

Il LessThanOrEqual metodo definisce l'operazione dell'operatore minore o uguale all'operatore per BigInteger i valori. Abilita codice come il seguente:

BigInteger number = BigInteger.Parse("9801324316220166912");
if (number <= Int64.MaxValue)
{
   // Do something.
}
else
{
   // Do something else.
}
let number = BigInteger.Parse "9801324316220166912"

if number <= Int64.MaxValue then
    // Do something.
    ()
else
    // Do something else.
    ()
Dim number As BigInteger = BigInteger.Parse("9801324316220166912")
If number <= Int64.MaxValue Then
   ' Do something.
Else
   ' Do something else.
End If

I linguaggi che non supportano operatori personalizzati possono invece chiamare il BigInteger.CompareTo(Int64) metodo . Possono anche chiamare direttamente il LessThanOrEqual(BigInteger, Int64) metodo , come illustrato nell'esempio seguente.

Dim number As BigInteger = BigInteger.Parse("9801324316220166912")
If BigInteger.op_LessThanOrEqual(number, Int64.MaxValue) Then
   ' Do something.
Else
   ' Do something else.
End If

Se right è un Bytevalore , Int16Int32SByte, , UInt16, o UInt32 , viene convertito in modo implicito in un Int64 valore quando viene eseguita l'operazione.

Il metodo equivalente per questo operatore è BigInteger.CompareTo(Int64).

Vedi anche

Si applica a