| BigIntegerStatic: Compare |
Compares two BigInteger instances to each other returning their relation.
Public Function Compare( ByVal Left As BigInteger, ByVal Right As BigInteger ) As Long
If Nothing is passed in, it is treated as zero.
| Value | Condition |
|---|---|
| Less than zero | Left is less than Right. |
| Zero | Left equals Right. |
| Greater than zero | Left is greater than Right. |
Dim a As BigInteger, b As BigInteger, Relation As String
Set a = BInt(1)
Set b = BInt(2)
Select Case BigInteger.Compare(a, b)
Case Is < 0: Relation = "<"
Case Is > 0: Relation = ">"
Case Else: Relation = "="
End Select
Console.WriteLine "{0} {1} {2}", a, Relation, b