BigInteger.LessThan Operatore

Definizione

Restituisce un valore che indica se un valore specificato è minore di un secondo valore specificato.

Overload

LessThan(UInt64, BigInteger)

Restituisce un valore che indica se un Unsigned Integer a 64 bit è minore di un valore BigInteger.

LessThan(BigInteger, UInt64)

Restituisce un valore che indica se un valore BigInteger è minore di un Unsigned Integer a 64 bit.

LessThan(BigInteger, Int64)

Restituisce un valore che indica se un valore BigInteger è minore di un Signed Integer a 64 bit.

LessThan(Int64, BigInteger)

Restituisce un valore che indica se un Signed Integer a 64 bit è minore di un valore BigInteger.

LessThan(BigInteger, BigInteger)

Restituisce un valore che indica se un valore BigInteger è minore di un altro valore BigInteger.

LessThan(UInt64, BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Importante

Questa API non è conforme a CLS.

Restituisce un valore che indica se un Unsigned Integer a 64 bit è minore di un valore BigInteger.

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.

Restituisce

true se left è minore di right; in caso contrario, false.

Attributi

Commenti

Il LessThan metodo definisce l'operazione dell'operatore minore di per BigInteger i valori. Abilita il codice, ad esempio quanto segue:

BigInteger number = BigInteger.Parse("9801324316220166912");
if (UInt64.MaxValue < number)
{
   // 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

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

Dim number As BigInteger = BigInteger.Parse("9801324316220166912")
If BigInteger.op_LessThan(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

LessThan(BigInteger, UInt64)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Importante

Questa API non è conforme a CLS.

Restituisce un valore che indica se un valore BigInteger è minore di un Unsigned Integer 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.

Restituisce

true se left è minore di right; in caso contrario, false.

Attributi

Commenti

Il LessThan metodo definisce l'operazione dell'operatore minore di per BigInteger i valori. Abilita il codice, ad esempio quanto segue:

BigInteger number = BigInteger.Parse("19801324316220166912");
if (number < UInt64.MaxValue)
{
   // 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

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

Dim number As BigInteger = BigInteger.Parse("19801324316220166912")
If BigInteger.op_LessThan(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

LessThan(BigInteger, Int64)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Restituisce un valore che indica se un valore BigInteger è minore di un Signed Integer 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.

Restituisce

true se left è minore di right; in caso contrario, false.

Commenti

Il LessThan metodo definisce l'operazione dell'operatore minore di per BigInteger i valori. Abilita il codice, ad esempio quanto segue:

BigInteger number = BigInteger.Parse("9801324316220166912");
if (number < Int64.MaxValue)
{
   // 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

Le lingue che non supportano operatori personalizzati possono invece chiamare il BigInteger.CompareTo(Int64) metodo. Alcuni linguaggi possono anche chiamare direttamente il metodo, come illustrato nell'esempio LessThan(BigInteger, Int64) seguente.

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

Se right è un Bytevalore , Int32Int16UInt16SByteo 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

LessThan(Int64, BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Restituisce un valore che indica se un Signed Integer a 64 bit è minore di un valore BigInteger.

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.

Restituisce

true se left è minore di right; in caso contrario, false.

Commenti

Il LessThan metodo definisce l'operazione dell'operatore minore di per BigInteger i valori. Abilita il codice, ad esempio quanto segue:

BigInteger number = BigInteger.Parse("9801324316220166912");
if (Int64.MaxValue < number)
{
   // 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

Le lingue che non supportano operatori personalizzati possono invece chiamare il BigInteger.CompareTo(Int64) metodo. Alcuni linguaggi possono anche chiamare direttamente il metodo, come illustrato nell'esempio LessThan(Int64, BigInteger) seguente.

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

Se left è un Bytevalore , Int32Int16UInt16SByteo 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

LessThan(BigInteger, BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Restituisce un valore che indica se un valore BigInteger è minore di un altro valore BigInteger.

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_LessThan;
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.

Restituisce

true se left è minore di right; in caso contrario, false.

Implementazioni

Commenti

Il LessThan metodo definisce l'operazione dell'operatore minore di per BigInteger i valori. Abilita il codice, ad esempio quanto segue:

BigInteger number1 = 945834723;
BigInteger number2 = 345145625;
BigInteger number3 = 945834724;
Console.WriteLine(number1 < number2);              // Displays False
Console.WriteLine(number1 < number3);              // Displays True
Dim number1 As BigInteger = 945834723
Dim number2 As BigInteger = 345145625
Dim number3 As BigInteger = 945834724 
Console.WriteLine(number1 < number2)                  ' Displays False
Console.WriteLine(number1 < number3)                  ' Displays True

Le lingue che non supportano operatori personalizzati possono invece chiamare il BigInteger.Compare metodo. Alcuni linguaggi possono anche chiamare direttamente il metodo, come illustrato nell'esempio LessThan(BigInteger, BigInteger) seguente.

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

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

Vedi anche

Si applica a