BigInteger Estrutura

Definição

Representa um inteiro assinado arbitrariamente grande.

public value class BigInteger : IComparable, IComparable<System::Numerics::BigInteger>, IEquatable<System::Numerics::BigInteger>, IFormattable
public value class BigInteger : IComparable<System::Numerics::BigInteger>, IEquatable<System::Numerics::BigInteger>, IParsable<System::Numerics::BigInteger>, ISpanParsable<System::Numerics::BigInteger>, IUtf8SpanParsable<System::Numerics::BigInteger>, System::Numerics::IAdditionOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IAdditiveIdentity<System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IBinaryInteger<System::Numerics::BigInteger>, System::Numerics::IBinaryNumber<System::Numerics::BigInteger>, System::Numerics::IBitwiseOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IComparisonOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, bool>, System::Numerics::IDecrementOperators<System::Numerics::BigInteger>, System::Numerics::IDivisionOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IEqualityOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, bool>, System::Numerics::IIncrementOperators<System::Numerics::BigInteger>, System::Numerics::IModulusOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IMultiplicativeIdentity<System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IMultiplyOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::INumber<System::Numerics::BigInteger>, System::Numerics::INumberBase<System::Numerics::BigInteger>, System::Numerics::IShiftOperators<System::Numerics::BigInteger, int, System::Numerics::BigInteger>, System::Numerics::ISignedNumber<System::Numerics::BigInteger>, System::Numerics::ISubtractionOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IUnaryNegationOperators<System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IUnaryPlusOperators<System::Numerics::BigInteger, System::Numerics::BigInteger>
public value class BigInteger : IComparable, IComparable<System::Numerics::BigInteger>, IEquatable<System::Numerics::BigInteger>, ISpanFormattable
public value class BigInteger : IComparable<System::Numerics::BigInteger>, IEquatable<System::Numerics::BigInteger>, IParsable<System::Numerics::BigInteger>, ISpanParsable<System::Numerics::BigInteger>, System::Numerics::IAdditionOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IAdditiveIdentity<System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IBinaryInteger<System::Numerics::BigInteger>, System::Numerics::IBinaryNumber<System::Numerics::BigInteger>, System::Numerics::IBitwiseOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IComparisonOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, bool>, System::Numerics::IDecrementOperators<System::Numerics::BigInteger>, System::Numerics::IDivisionOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IEqualityOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, bool>, System::Numerics::IIncrementOperators<System::Numerics::BigInteger>, System::Numerics::IModulusOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IMultiplicativeIdentity<System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IMultiplyOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::INumber<System::Numerics::BigInteger>, System::Numerics::INumberBase<System::Numerics::BigInteger>, System::Numerics::IShiftOperators<System::Numerics::BigInteger, int, System::Numerics::BigInteger>, System::Numerics::ISignedNumber<System::Numerics::BigInteger>, System::Numerics::ISubtractionOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IUnaryNegationOperators<System::Numerics::BigInteger, System::Numerics::BigInteger>, System::Numerics::IUnaryPlusOperators<System::Numerics::BigInteger, System::Numerics::BigInteger>
public struct BigInteger : IComparable, IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, IFormattable
public readonly struct BigInteger : IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, IParsable<System.Numerics.BigInteger>, ISpanParsable<System.Numerics.BigInteger>, IUtf8SpanParsable<System.Numerics.BigInteger>, System.Numerics.IAdditionOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IAdditiveIdentity<System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IBinaryInteger<System.Numerics.BigInteger>, System.Numerics.IBinaryNumber<System.Numerics.BigInteger>, System.Numerics.IBitwiseOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IComparisonOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,bool>, System.Numerics.IDecrementOperators<System.Numerics.BigInteger>, System.Numerics.IDivisionOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IEqualityOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,bool>, System.Numerics.IIncrementOperators<System.Numerics.BigInteger>, System.Numerics.IModulusOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IMultiplicativeIdentity<System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IMultiplyOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.INumber<System.Numerics.BigInteger>, System.Numerics.INumberBase<System.Numerics.BigInteger>, System.Numerics.IShiftOperators<System.Numerics.BigInteger,int,System.Numerics.BigInteger>, System.Numerics.ISignedNumber<System.Numerics.BigInteger>, System.Numerics.ISubtractionOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IUnaryNegationOperators<System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IUnaryPlusOperators<System.Numerics.BigInteger,System.Numerics.BigInteger>
public readonly struct BigInteger : IComparable, IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, IFormattable
public readonly struct BigInteger : IComparable, IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, ISpanFormattable
public readonly struct BigInteger : IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, IParsable<System.Numerics.BigInteger>, ISpanParsable<System.Numerics.BigInteger>, System.Numerics.IAdditionOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IAdditiveIdentity<System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IBinaryInteger<System.Numerics.BigInteger>, System.Numerics.IBinaryNumber<System.Numerics.BigInteger>, System.Numerics.IBitwiseOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IComparisonOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,bool>, System.Numerics.IDecrementOperators<System.Numerics.BigInteger>, System.Numerics.IDivisionOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IEqualityOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,bool>, System.Numerics.IIncrementOperators<System.Numerics.BigInteger>, System.Numerics.IModulusOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IMultiplicativeIdentity<System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IMultiplyOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.INumber<System.Numerics.BigInteger>, System.Numerics.INumberBase<System.Numerics.BigInteger>, System.Numerics.IShiftOperators<System.Numerics.BigInteger,int,System.Numerics.BigInteger>, System.Numerics.ISignedNumber<System.Numerics.BigInteger>, System.Numerics.ISubtractionOperators<System.Numerics.BigInteger,System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IUnaryNegationOperators<System.Numerics.BigInteger,System.Numerics.BigInteger>, System.Numerics.IUnaryPlusOperators<System.Numerics.BigInteger,System.Numerics.BigInteger>
[System.Serializable]
public struct BigInteger : IComparable, IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, IFormattable
type BigInteger = struct
    interface IFormattable
type BigInteger = struct
    interface IFormattable
    interface IParsable<BigInteger>
    interface ISpanFormattable
    interface ISpanParsable<BigInteger>
    interface IAdditionOperators<BigInteger, BigInteger, BigInteger>
    interface IAdditiveIdentity<BigInteger, BigInteger>
    interface IBinaryInteger<BigInteger>
    interface IBinaryNumber<BigInteger>
    interface IBitwiseOperators<BigInteger, BigInteger, BigInteger>
    interface IComparisonOperators<BigInteger, BigInteger, bool>
    interface IEqualityOperators<BigInteger, BigInteger, bool>
    interface IDecrementOperators<BigInteger>
    interface IDivisionOperators<BigInteger, BigInteger, BigInteger>
    interface IIncrementOperators<BigInteger>
    interface IModulusOperators<BigInteger, BigInteger, BigInteger>
    interface IMultiplicativeIdentity<BigInteger, BigInteger>
    interface IMultiplyOperators<BigInteger, BigInteger, BigInteger>
    interface INumber<BigInteger>
    interface INumberBase<BigInteger>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<BigInteger>
    interface ISubtractionOperators<BigInteger, BigInteger, BigInteger>
    interface IUnaryNegationOperators<BigInteger, BigInteger>
    interface IUnaryPlusOperators<BigInteger, BigInteger>
    interface IShiftOperators<BigInteger, int, BigInteger>
    interface ISignedNumber<BigInteger>
type BigInteger = struct
    interface IFormattable
    interface IParsable<BigInteger>
    interface ISpanFormattable
    interface ISpanParsable<BigInteger>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<BigInteger>
    interface IAdditionOperators<BigInteger, BigInteger, BigInteger>
    interface IAdditiveIdentity<BigInteger, BigInteger>
    interface IBinaryInteger<BigInteger>
    interface IBinaryNumber<BigInteger>
    interface IBitwiseOperators<BigInteger, BigInteger, BigInteger>
    interface IComparisonOperators<BigInteger, BigInteger, bool>
    interface IEqualityOperators<BigInteger, BigInteger, bool>
    interface IDecrementOperators<BigInteger>
    interface IDivisionOperators<BigInteger, BigInteger, BigInteger>
    interface IIncrementOperators<BigInteger>
    interface IModulusOperators<BigInteger, BigInteger, BigInteger>
    interface IMultiplicativeIdentity<BigInteger, BigInteger>
    interface IMultiplyOperators<BigInteger, BigInteger, BigInteger>
    interface INumber<BigInteger>
    interface INumberBase<BigInteger>
    interface ISubtractionOperators<BigInteger, BigInteger, BigInteger>
    interface IUnaryNegationOperators<BigInteger, BigInteger>
    interface IUnaryPlusOperators<BigInteger, BigInteger>
    interface IShiftOperators<BigInteger, int, BigInteger>
    interface ISignedNumber<BigInteger>
type BigInteger = struct
    interface ISpanFormattable
    interface IFormattable
type BigInteger = struct
    interface IFormattable
    interface IParsable<BigInteger>
    interface ISpanFormattable
    interface ISpanParsable<BigInteger>
    interface IAdditionOperators<BigInteger, BigInteger, BigInteger>
    interface IAdditiveIdentity<BigInteger, BigInteger>
    interface IBinaryInteger<BigInteger>
    interface IBinaryNumber<BigInteger>
    interface IBitwiseOperators<BigInteger, BigInteger, BigInteger>
    interface IComparisonOperators<BigInteger, BigInteger, bool>
    interface IEqualityOperators<BigInteger, BigInteger, bool>
    interface IDecrementOperators<BigInteger>
    interface IDivisionOperators<BigInteger, BigInteger, BigInteger>
    interface IIncrementOperators<BigInteger>
    interface IModulusOperators<BigInteger, BigInteger, BigInteger>
    interface IMultiplicativeIdentity<BigInteger, BigInteger>
    interface IMultiplyOperators<BigInteger, BigInteger, BigInteger>
    interface INumber<BigInteger>
    interface INumberBase<BigInteger>
    interface ISubtractionOperators<BigInteger, BigInteger, BigInteger>
    interface IUnaryNegationOperators<BigInteger, BigInteger>
    interface IUnaryPlusOperators<BigInteger, BigInteger>
    interface IShiftOperators<BigInteger, int, BigInteger>
    interface ISignedNumber<BigInteger>
type BigInteger = struct
    interface IFormattable
    interface IParsable<BigInteger>
    interface ISpanFormattable
    interface ISpanParsable<BigInteger>
    interface IAdditionOperators<BigInteger, BigInteger, BigInteger>
    interface IAdditiveIdentity<BigInteger, BigInteger>
    interface IBinaryInteger<BigInteger>
    interface IBinaryNumber<BigInteger>
    interface IBitwiseOperators<BigInteger, BigInteger, BigInteger>
    interface IComparisonOperators<BigInteger, BigInteger, bool>
    interface IEqualityOperators<BigInteger, BigInteger, bool>
    interface IDecrementOperators<BigInteger>
    interface IDivisionOperators<BigInteger, BigInteger, BigInteger>
    interface IIncrementOperators<BigInteger>
    interface IModulusOperators<BigInteger, BigInteger, BigInteger>
    interface IMultiplicativeIdentity<BigInteger, BigInteger>
    interface IMultiplyOperators<BigInteger, BigInteger, BigInteger>
    interface INumber<BigInteger>
    interface INumberBase<BigInteger>
    interface ISubtractionOperators<BigInteger, BigInteger, BigInteger>
    interface IUnaryNegationOperators<BigInteger, BigInteger>
    interface IUnaryPlusOperators<BigInteger, BigInteger>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<BigInteger>
    interface IShiftOperators<BigInteger, int, BigInteger>
    interface ISignedNumber<BigInteger>
[<System.Serializable>]
type BigInteger = struct
    interface IFormattable
Public Structure BigInteger
Implements IComparable, IComparable(Of BigInteger), IEquatable(Of BigInteger), IFormattable
Public Structure BigInteger
Implements IAdditionOperators(Of BigInteger, BigInteger, BigInteger), IAdditiveIdentity(Of BigInteger, BigInteger), IBinaryInteger(Of BigInteger), IBinaryNumber(Of BigInteger), IBitwiseOperators(Of BigInteger, BigInteger, BigInteger), IComparable(Of BigInteger), IComparisonOperators(Of BigInteger, BigInteger, Boolean), IDecrementOperators(Of BigInteger), IDivisionOperators(Of BigInteger, BigInteger, BigInteger), IEqualityOperators(Of BigInteger, BigInteger, Boolean), IEquatable(Of BigInteger), IIncrementOperators(Of BigInteger), IModulusOperators(Of BigInteger, BigInteger, BigInteger), IMultiplicativeIdentity(Of BigInteger, BigInteger), IMultiplyOperators(Of BigInteger, BigInteger, BigInteger), INumber(Of BigInteger), INumberBase(Of BigInteger), IParsable(Of BigInteger), IShiftOperators(Of BigInteger, Integer, BigInteger), ISignedNumber(Of BigInteger), ISpanParsable(Of BigInteger), ISubtractionOperators(Of BigInteger, BigInteger, BigInteger), IUnaryNegationOperators(Of BigInteger, BigInteger), IUnaryPlusOperators(Of BigInteger, BigInteger), IUtf8SpanParsable(Of BigInteger)
Public Structure BigInteger
Implements IComparable, IComparable(Of BigInteger), IEquatable(Of BigInteger), ISpanFormattable
Public Structure BigInteger
Implements IAdditionOperators(Of BigInteger, BigInteger, BigInteger), IAdditiveIdentity(Of BigInteger, BigInteger), IBinaryInteger(Of BigInteger), IBinaryNumber(Of BigInteger), IBitwiseOperators(Of BigInteger, BigInteger, BigInteger), IComparable(Of BigInteger), IComparisonOperators(Of BigInteger, BigInteger, Boolean), IDecrementOperators(Of BigInteger), IDivisionOperators(Of BigInteger, BigInteger, BigInteger), IEqualityOperators(Of BigInteger, BigInteger, Boolean), IEquatable(Of BigInteger), IIncrementOperators(Of BigInteger), IModulusOperators(Of BigInteger, BigInteger, BigInteger), IMultiplicativeIdentity(Of BigInteger, BigInteger), IMultiplyOperators(Of BigInteger, BigInteger, BigInteger), INumber(Of BigInteger), INumberBase(Of BigInteger), IParsable(Of BigInteger), IShiftOperators(Of BigInteger, Integer, BigInteger), ISignedNumber(Of BigInteger), ISpanParsable(Of BigInteger), ISubtractionOperators(Of BigInteger, BigInteger, BigInteger), IUnaryNegationOperators(Of BigInteger, BigInteger), IUnaryPlusOperators(Of BigInteger, BigInteger)
Herança
BigInteger
Atributos
Implementações
IComparable IComparable<BigInteger> IEquatable<BigInteger> IFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<BigInteger> IParsable<TSelf> ISpanFormattable ISpanParsable<BigInteger> ISpanParsable<TSelf> IUtf8SpanFormattable IUtf8SpanParsable<BigInteger> IUtf8SpanParsable<TSelf> IAdditionOperators<BigInteger,BigInteger,BigInteger> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<BigInteger,BigInteger> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<BigInteger> IBinaryNumber<BigInteger> IBinaryNumber<TSelf> IBitwiseOperators<BigInteger,BigInteger,BigInteger> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<BigInteger,BigInteger,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<BigInteger> IDecrementOperators<TSelf> IDivisionOperators<BigInteger,BigInteger,BigInteger> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<BigInteger,BigInteger,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<BigInteger> IIncrementOperators<TSelf> IModulusOperators<BigInteger,BigInteger,BigInteger> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<BigInteger,BigInteger> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<BigInteger,BigInteger,BigInteger> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<BigInteger> INumber<TSelf> INumberBase<BigInteger> INumberBase<TSelf> IShiftOperators<BigInteger,Int32,BigInteger> IShiftOperators<TSelf,Int32,TSelf> ISignedNumber<BigInteger> ISubtractionOperators<BigInteger,BigInteger,BigInteger> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<BigInteger,BigInteger> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<BigInteger,BigInteger> IUnaryPlusOperators<TSelf,TSelf>

Observações

O BigInteger tipo é um tipo imutável que representa um inteiro arbitrariamente grande cujo valor em teoria não tem limites superiores ou inferiores. Os membros do tipo BigInteger são muito semelhantes àqueles de outros tipos integrais (Byte, Int16, Int32, Int64, SByte, UInt16, UInt32, e UInt64). Este tipo difere dos outros tipos integrais no .NET, que têm um intervalo indicado por suas MinValue e MaxValue propriedades.

Note

Como o BigInteger tipo é imutável (consulte Mutabilidade) e porque não tem limites superiores ou inferiores, um OutOfMemoryException pode ser lançado para qualquer operação que faça com que um BigInteger valor cresça demais.

Instanciar um objeto BigInteger

Você pode instanciar um BigInteger objeto de várias maneiras:

  • Você pode usar a new palavra-chave e fornecer qualquer valor integral ou de ponto flutuante como um parâmetro para o BigInteger construtor. (Os valores em ponto flutuante são truncados antes de serem atribuídos ao BigInteger.) O exemplo a seguir ilustra como usar a palavra-chave new para instanciar valores de BigInteger.

    BigInteger bigIntFromDouble = new BigInteger(179032.6541);
    Console.WriteLine(bigIntFromDouble);
    BigInteger bigIntFromInt64 = new BigInteger(934157136952);
    Console.WriteLine(bigIntFromInt64);
    // The example displays the following output:
    //   179032
    //   934157136952
    
    Dim bigIntFromDouble As New BigInteger(179032.6541)
    Console.WriteLine(bigIntFromDouble)
    Dim bigIntFromInt64 As New BigInteger(934157136952)
    Console.WriteLine(bigIntFromInt64)
    ' The example displays the following output:
    '   179032
    '   934157136952
    
  • Você pode declarar uma BigInteger variável e atribuir-lhe um valor como faria com qualquer tipo numérico, desde que esse valor seja um tipo integral. O exemplo a seguir usa atribuição para criar um valor BigInteger a partir de um Int64 arquivo.

    long longValue = 6315489358112;
    BigInteger assignedFromLong = longValue;
    Console.WriteLine(assignedFromLong);
    // The example displays the following output:
    //   6315489358112
    
    Dim longValue As Long = 6315489358112
    Dim assignedFromLong As BigInteger = longValue
    Console.WriteLine(assignedFromLong)
    ' The example displays the following output:
    '   6315489358112
    
  • Você pode atribuir um valor decimal ou de ponto flutuante a um BigInteger objeto se fizer um cast ou convertê-lo primeiro. O exemplo a seguir faz uma conversão explícita (em C#) ou converte (em Visual Basic) um valor Double e Decimal para um BigInteger.

    BigInteger assignedFromDouble = (BigInteger) 179032.6541;
    Console.WriteLine(assignedFromDouble);
    BigInteger assignedFromDecimal = (BigInteger) 64312.65m;
    Console.WriteLine(assignedFromDecimal);
    // The example displays the following output:
    //   179032
    //   64312
    
    Dim assignedFromDouble As BigInteger = CType(179032.6541, BigInteger)
    Console.WriteLine(assignedFromDouble)
    Dim assignedFromDecimal As BigInteger = CType(64312.65D, BigInteger)
    Console.WriteLine(assignedFromDecimal)
    ' The example displays the following output:
    '   179032
    '   64312
    

Esses métodos permitem que você instancie um BigInteger objeto cujo valor está no intervalo de um dos tipos numéricos existentes somente. Você pode instanciar um BigInteger objeto cujo valor pode exceder o intervalo dos tipos numéricos existentes de uma das três maneiras:

  • Você pode usar a new palavra-chave e fornecer uma matriz de bytes de qualquer tamanho para o BigInteger.BigInteger construtor. Por exemplo:

    byte[] byteArray = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
    BigInteger newBigInt = new BigInteger(byteArray);
    Console.WriteLine($"The value of newBigInt is {newBigInt} (or 0x{newBigInt:x}).");
    // The example displays the following output:
    //   The value of newBigInt is 4759477275222530853130 (or 0x102030405060708090a).
    
    Dim byteArray() As Byte = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
    Dim newBigInt As New BigInteger(byteArray)
    Console.WriteLine("The value of newBigInt is {0} (or 0x{0:x}).", newBigInt)
    ' The example displays the following output:
    '   The value of newBigInt is 4759477275222530853130 (or 0x102030405060708090a).
    
  • Você pode chamar os métodos Parse ou TryParse para converter a representação de cadeia de caracteres de um número em um BigInteger. Por exemplo:

    string positiveString = "91389681247993671255432112000000";
    string negativeString = "-90315837410896312071002088037140000";
    BigInteger posBigInt = 0;
    BigInteger negBigInt = 0;
    
    try {
       posBigInt = BigInteger.Parse(positiveString);
       Console.WriteLine(posBigInt);
    }
    catch (FormatException)
    {
       Console.WriteLine($"Unable to convert the string '{positiveString}' to a BigInteger value.");
    }
    
    if (BigInteger.TryParse(negativeString, out negBigInt))
      Console.WriteLine(negBigInt);
    else
       Console.WriteLine($"Unable to convert the string '{negativeString}' to a BigInteger value.");
    
    // The example displays the following output:
    //   9.1389681247993671255432112E+31
    //   -9.0315837410896312071002088037E+34
    
    Dim positiveString As String = "91389681247993671255432112000000"
    Dim negativeString As String = "-90315837410896312071002088037140000"
    Dim posBigInt As BigInteger = 0
    Dim negBigInt As BigInteger = 0
    
    Try
        posBigInt = BigInteger.Parse(positiveString)
        Console.WriteLine(posBigInt)
    Catch e As FormatException
        Console.WriteLine("Unable to convert the string '{0}' to a BigInteger value.",
                          positiveString)
    End Try
    
    If BigInteger.TryParse(negativeString, negBigInt) Then
        Console.WriteLine(negBigInt)
    Else
        Console.WriteLine("Unable to convert the string '{0}' to a BigInteger value.",
                           negativeString)
    End If
    ' The example displays the following output:
    '   9.1389681247993671255432112E+31
    '   -9.0315837410896312071002088037E+34
    
  • Você pode chamar um static método (Shared no Visual Basic) BigInteger que executa alguma operação em uma expressão numérica e retorna um resultado calculado BigInteger . O exemplo a seguir faz isso cubando UInt64.MaxValue e atribuindo o resultado a BigInteger.

    BigInteger number = BigInteger.Pow(UInt64.MaxValue, 3);
    Console.WriteLine(number);
    // The example displays the following output:
    //    6277101735386680762814942322444851025767571854389858533375
    
    Dim number As BigInteger = BigInteger.Pow(UInt64.MaxValue, 3)
    Console.WriteLine(number)
    ' The example displays the following output:
    ' 6277101735386680762814942322444851025767571854389858533375
    

O valor não inicializado de a BigInteger é Zero.

Executar operações em valores BigInteger

Você pode usar uma BigInteger instância como usaria qualquer outro tipo integral. BigInteger sobrecarrega os operadores numéricos padrão para permitir que você execute operações matemáticas básicas, como adição, subtração, divisão, multiplicação e negação unária. Você também pode usar os operadores numéricos padrão para comparar dois BigInteger valores entre si. Como os outros tipos integrais, BigInteger também suporta os operadores bit a bit And, Or, XOr, deslocamento para a esquerda e deslocamento para a direita. Para linguagens que não suportam operadores personalizados, a BigInteger estrutura também fornece métodos equivalentes para executar operações matemáticas. Estes incluem Add, Divide, , Multiply, Negate, Subtracte vários outros.

Muitos membros da BigInteger estrutura correspondem diretamente aos membros dos outros tipos integrais. Além disso, BigInteger adiciona membros como os seguintes:

Muitos destes membros adicionais correspondem aos membros da classe Math, que fornece a funcionalidade para trabalhar com os tipos numéricos primitivos.

Mutability

O exemplo a seguir instancia um BigInteger objeto e, em seguida, incrementa seu valor em um.

BigInteger number = BigInteger.Multiply(Int64.MaxValue, 3);
number++;
Console.WriteLine(number);
Dim number As BigInteger = BigInteger.Multiply(Int64.MaxValue, 3)
number += 1
Console.WriteLine(number)

Embora este exemplo pareça modificar o valor do objeto existente, esse não é o caso. BigInteger Os objetos são imutáveis, o que significa que, internamente, o Common Language Runtime realmente cria um novo BigInteger objeto e atribui a ele um valor maior do que seu valor anterior. Esse novo objeto é então retornado ao chamador.

Note

Os outros tipos numéricos no .NET também são imutáveis. No entanto, como o BigInteger tipo não tem limites superiores ou inferiores, seus valores podem crescer extremamente e ter um impacto mensurável no desempenho.

Embora esse processo seja transparente para o chamador, ele incorre em uma penalidade de desempenho. Em alguns casos, especialmente quando operações repetidas são realizadas em um loop em valores muito grandes BigInteger , essa penalidade de desempenho pode ser significativa. Por exemplo, no exemplo a seguir, uma operação é executada repetidamente até um milhão de vezes, e um BigInteger valor é incrementado em um sempre que a operação é bem-sucedida.

BigInteger number = Int64.MaxValue ^ 5;
int repetitions = 1000000;
// Perform some repetitive operation 1 million times.
for (int ctr = 0; ctr <= repetitions; ctr++)
{
    // Perform some operation. If it fails, exit the loop.
    if (!SomeOperationSucceeds()) break;
    // The following code executes if the operation succeeds.
    number++;
}
Dim number As BigInteger = Int64.MaxValue ^ 5
Dim repetitions As Integer = 1000000
' Perform some repetitive operation 1 million times.
For ctr As Integer = 0 To repetitions
    ' Perform some operation. If it fails, exit the loop.
    If Not SomeOperationSucceeds() Then Exit For
    ' The following code executes if the operation succeeds.
    number += 1
Next

Nesse caso, você pode melhorar o desempenho executando todas as atribuições intermediárias para uma Int32 variável. O valor final da variável pode então ser atribuído ao BigInteger objeto quando o loop é encerrado. O exemplo a seguir fornece uma ilustração.

BigInteger number = Int64.MaxValue ^ 5;
int repetitions = 1000000;
int actualRepetitions = 0;
// Perform some repetitive operation 1 million times.
for (int ctr = 0; ctr <= repetitions; ctr++)
{
    // Perform some operation. If it fails, exit the loop.
    if (!SomeOperationSucceeds()) break;
    // The following code executes if the operation succeeds.
    actualRepetitions++;
}
number += actualRepetitions;
Dim number As BigInteger = Int64.MaxValue ^ 5
Dim repetitions As Integer = 1000000
Dim actualRepetitions As Integer = 0
' Perform some repetitive operation 1 million times.
For ctr As Integer = 0 To repetitions
    ' Perform some operation. If it fails, exit the loop.
    If Not SomeOperationSucceeds() Then Exit For
    ' The following code executes if the operation succeeds.
    actualRepetitions += 1
Next
number += actualRepetitions

Matrizes de bytes e cadeias hexadecimais

Se você converter BigInteger valores em matrizes de bytes, ou se converter matrizes de bytes em BigInteger valores, deverá considerar a ordem dos bytes. A BigInteger estrutura espera que os bytes individuais em uma matriz de bytes apareçam em ordem little-endian (ou seja, os bytes de ordem inferior do valor precedem os bytes de ordem superior). Você pode realizar uma operação completa de BigInteger ao chamar o método ToByteArray e, em seguida, passando a matriz de bytes resultante para o construtor BigInteger(Byte[]), conforme mostra o exemplo a seguir.

BigInteger number = BigInteger.Pow(Int64.MaxValue, 2);
Console.WriteLine(number);

// Write the BigInteger value to a byte array.
byte[] bytes = number.ToByteArray();

// Display the byte array.
foreach (byte byteValue in bytes)
    Console.Write("0x{0:X2} ", byteValue);
Console.WriteLine();

// Restore the BigInteger value from a Byte array.
BigInteger newNumber = new BigInteger(bytes);
Console.WriteLine(newNumber);
// The example displays the following output:
//    8.5070591730234615847396907784E+37
//    0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x3F
//
//    8.5070591730234615847396907784E+37
Dim number As BigInteger = BigInteger.Pow(Int64.MaxValue, 2)     
Console.WriteLine(number)

' Write the BigInteger value to a byte array.
Dim bytes() As Byte = number.ToByteArray()

' Display the byte array.
For Each byteValue As Byte In bytes
   Console.Write("0x{0:X2} ", byteValue)
Next   
Console.WriteLine()

' Restore the BigInteger value from a Byte array.
Dim newNumber As BigInteger = New BigInteger(bytes)
Console.WriteLine(newNumber)               
' The example displays the following output:
'    8.5070591730234615847396907784E+37
'    0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x3F
'    
'    8.5070591730234615847396907784E+37

Para instanciar um BigInteger valor de uma matriz de bytes que representa um valor de algum outro tipo integral, você pode passar o valor integral para o BitConverter.GetBytes método e, em seguida, passar a matriz de bytes resultante para o BigInteger(Byte[]) construtor. O exemplo a seguir instancia um BigInteger valor de uma matriz de bytes que representa um Int16 valor.

short originalValue = 30000;
Console.WriteLine(originalValue);

// Convert the Int16 value to a byte array.
byte[] bytes = BitConverter.GetBytes(originalValue);

// Display the byte array.
foreach (byte byteValue in bytes)
    Console.Write("0x{0} ", byteValue.ToString("X2"));
Console.WriteLine();

// Pass byte array to the BigInteger constructor.
BigInteger number = new BigInteger(bytes);
Console.WriteLine(number);
// The example displays the following output:
//       30000
//       0x30 0x75
//       30000
Dim originalValue As Short = 30000
Console.WriteLine(originalValue)

' Convert the Int16 value to a byte array.
Dim bytes() As Byte = BitConverter.GetBytes(originalValue)

' Display the byte array.
For Each byteValue As Byte In bytes
   Console.Write("0x{0} ", byteValue.ToString("X2"))
Next    
Console.WriteLine() 

' Pass byte array to the BigInteger constructor.
Dim number As BigInteger = New BigInteger(bytes)
Console.WriteLine(number)
' The example displays the following output:
'       30000
'       0x30 0x75
'       30000

A BigInteger estrutura assume que os valores negativos são armazenados usando a representação do complemento de dois. Como a BigInteger estrutura representa um valor numérico sem comprimento fixo, o BigInteger(Byte[]) construtor sempre interpreta o bit mais significativo do último byte na matriz como um bit de sinal. Para evitar que o BigInteger(Byte[]) construtor confunda a representação do complemento dos dois de um valor negativo com a representação de sinal e magnitude de um valor positivo, os valores positivos nos quais o bit mais significativo do último byte na matriz de bytes normalmente seria definido devem incluir um byte adicional cujo valor é 0. Por exemplo, 0xC0 0xBD 0xF0 0xFF pode ser a representação hexadecimal little-endian de -1.000.000 ou de 4.293.967.296. Como o bit mais significativo do último byte nessa matriz está ativado, o valor da matriz de bytes seria interpretado pelo BigInteger(Byte[]) construtor como -1.000.000. Para instanciar um BigInteger cujo valor é positivo, uma matriz de bytes cujos elementos são 0xC0 0xBD 0xF0 0xFF 0x00 deve ser passada para o construtor. O seguinte exemplo ilustra precisamente isto.

int negativeNumber = -1000000;
uint positiveNumber = 4293967296;

byte[] negativeBytes = BitConverter.GetBytes(negativeNumber);
BigInteger negativeBigInt = new BigInteger(negativeBytes);
Console.WriteLine(negativeBigInt.ToString("N0"));

byte[] tempPosBytes = BitConverter.GetBytes(positiveNumber);
byte[] positiveBytes = new byte[tempPosBytes.Length + 1];
Array.Copy(tempPosBytes, positiveBytes, tempPosBytes.Length);
BigInteger positiveBigInt = new BigInteger(positiveBytes);
Console.WriteLine(positiveBigInt.ToString("N0"));
// The example displays the following output:
//    -1,000,000
//    4,293,967,296
Dim negativeNumber As Integer = -1000000
Dim positiveNumber As UInteger = 4293967296

Dim negativeBytes() As Byte = BitConverter.GetBytes(negativeNumber) 
Dim negativeBigInt As New BigInteger(negativeBytes)
Console.WriteLine(negativeBigInt.ToString("N0"))

Dim tempPosBytes() As Byte = BitConverter.GetBytes(positiveNumber)
Dim positiveBytes(tempposBytes.Length) As Byte
Array.Copy(tempPosBytes, positiveBytes, tempPosBytes.Length)
Dim positiveBigInt As New BigInteger(positiveBytes)
Console.WriteLine(positiveBigInt.ToString("N0")) 
' The example displays the following output:
'    -1,000,000
'    4,293,967,296

As matrizes de bytes criadas pelo método a ToByteArray partir de valores positivos incluem esse byte extra de valor zero. Portanto, a BigInteger estrutura pode obter com êxito valores de ida e volta atribuindo-os a matrizes de bytes e, em seguida, restaurando-os a partir delas, como mostra o exemplo a seguir.

BigInteger positiveValue = 15777216;
BigInteger negativeValue = -1000000;

Console.WriteLine("Positive value: " + positiveValue.ToString("N0"));
byte[] bytes = positiveValue.ToByteArray();

foreach (byte byteValue in bytes)
    Console.Write("{0:X2} ", byteValue);
Console.WriteLine();
positiveValue = new BigInteger(bytes);
Console.WriteLine("Restored positive value: " + positiveValue.ToString("N0"));

Console.WriteLine();

Console.WriteLine("Negative value: " + negativeValue.ToString("N0"));
bytes = negativeValue.ToByteArray();
foreach (byte byteValue in bytes)
    Console.Write("{0:X2} ", byteValue);
Console.WriteLine();
negativeValue = new BigInteger(bytes);
Console.WriteLine("Restored negative value: " + negativeValue.ToString("N0"));
// The example displays the following output:
//       Positive value: 15,777,216
//       C0 BD F0 00
//       Restored positive value: 15,777,216
//
//       Negative value: -1,000,000
//       C0 BD F0
//       Restored negative value: -1,000,000
Dim positiveValue As BigInteger = 15777216
Dim negativeValue As BigInteger = -1000000

Console.WriteLine("Positive value: " + positiveValue.ToString("N0"))
Dim bytes() As Byte = positiveValue.ToByteArray()
For Each byteValue As Byte In bytes
   Console.Write("{0:X2} ", byteValue)
Next
Console.WriteLine()
positiveValue = New BigInteger(bytes)
Console.WriteLine("Restored positive value: " + positiveValue.ToString("N0"))

Console.WriteLine()
   
Console.WriteLIne("Negative value: " + negativeValue.ToString("N0"))
bytes = negativeValue.ToByteArray()
For Each byteValue As Byte In bytes
   Console.Write("{0:X2} ", byteValue)
Next
Console.WriteLine()
negativeValue = New BigInteger(bytes)
Console.WriteLine("Restored negative value: " + negativeValue.ToString("N0"))
' The example displays the following output:
'       Positive value: 15,777,216
'       C0 BD F0 00
'       Restored positive value: 15,777,216
'       
'       Negative value: -1,000,000
'       C0 BD F0
'       Restored negative value: -1,000,000

No entanto, talvez seja necessário adicionar esse byte adicional de valor zero a matrizes de bytes criadas dinamicamente pelo desenvolvedor ou retornadas por métodos que convertem inteiros não assinados em matrizes de bytes (como BitConverter.GetBytes(UInt16), BitConverter.GetBytes(UInt32)e BitConverter.GetBytes(UInt64)).

Ao analisar uma cadeia de caracteres hexadecimal, os BigInteger.Parse(String, NumberStyles) métodos e BigInteger.Parse(String, NumberStyles, IFormatProvider) assumem que, se o bit mais significativo do primeiro byte na cadeia de caracteres for definido, ou se o primeiro dígito hexadecimal da cadeia representar os quatro bits inferiores de um valor de byte, o valor será representado usando a representação do complemento de dois. Por exemplo, "FF01" e "F01" representam o valor decimal -255. Para diferenciar valores positivos de negativos, os valores positivos devem incluir um zero inicial. As sobrecargas relevantes do método ToString, quando são passadas a cadeia de formato "X", adicionam um zero à esquerda à cadeia hexadecimal retornada para valores positivos. Isso torna possível percorrer os valores BigInteger utilizando os métodos ToString e Parse, como mostra o exemplo a seguir.

BigInteger negativeNumber = -1000000;
BigInteger positiveNumber = 15777216;

string negativeHex = negativeNumber.ToString("X");
string positiveHex = positiveNumber.ToString("X");

BigInteger negativeNumber2, positiveNumber2;
negativeNumber2 = BigInteger.Parse(negativeHex,
                                   NumberStyles.HexNumber);
positiveNumber2 = BigInteger.Parse(positiveHex,
                                   NumberStyles.HexNumber);

Console.WriteLine($"Converted {negativeNumber:N0} to {negativeHex} back to {negativeNumber2:N0}.");
Console.WriteLine($"Converted {positiveNumber:N0} to {positiveHex} back to {positiveNumber2:N0}.");
// The example displays the following output:
//       Converted -1,000,000 to F0BDC0 back to -1,000,000.
//       Converted 15,777,216 to 0F0BDC0 back to 15,777,216.
Dim negativeNumber As BigInteger = -1000000
Dim positiveNumber As BigInteger = 15777216

Dim negativeHex As String = negativeNumber.ToString("X")
Dim positiveHex As string = positiveNumber.ToString("X")

Dim negativeNumber2, positiveNumber2 As BigInteger 
negativeNumber2 = BigInteger.Parse(negativeHex, 
                                   NumberStyles.HexNumber)
positiveNumber2 = BigInteger.Parse(positiveHex,
                                   NumberStyles.HexNumber)

Console.WriteLine("Converted {0:N0} to {1} back to {2:N0}.", 
                   negativeNumber, negativeHex, negativeNumber2)                                         
Console.WriteLine("Converted {0:N0} to {1} back to {2:N0}.", 
                   positiveNumber, positiveHex, positiveNumber2)                                         
' The example displays the following output:
'       Converted -1,000,000 to F0BDC0 back to -1,000,000.
'       Converted 15,777,216 to 0F0BDC0 back to 15,777,216.

No entanto, as cadeias de caracteres hexadecimais criadas chamando os ToString métodos dos outros tipos integrais ou as sobrecargas do ToString método que incluem um toBase parâmetro não indicam o sinal do valor ou o tipo de dados de origem do qual a cadeia hexadecimal foi derivada. Instanciar com êxito um BigInteger valor de tal cadeia de caracteres requer alguma lógica adicional. O exemplo a seguir fornece uma implementação possível.

using System;
using System.Globalization;
using System.Numerics;

public struct HexValue
{
    public int Sign;
    public string Value;
}

public class ByteHexExample2
{
    public static void Main()
    {
        uint positiveNumber = 4039543321;
        int negativeNumber = -255423975;

        // Convert the numbers to hex strings.
        HexValue hexValue1, hexValue2;
        hexValue1.Value = positiveNumber.ToString("X");
        hexValue1.Sign = Math.Sign(positiveNumber);

        hexValue2.Value = Convert.ToString(negativeNumber, 16);
        hexValue2.Sign = Math.Sign(negativeNumber);

        // Round-trip the hexadecimal values to BigInteger values.
        string hexString;
        BigInteger positiveBigInt, negativeBigInt;

        hexString = (hexValue1.Sign == 1 ? "0" : "") + hexValue1.Value;
        positiveBigInt = BigInteger.Parse(hexString, NumberStyles.HexNumber);
        Console.WriteLine($"Converted {positiveNumber} to {hexValue1.Value} and back to {positiveBigInt}.");

        hexString = (hexValue2.Sign == 1 ? "0" : "") + hexValue2.Value;
        negativeBigInt = BigInteger.Parse(hexString, NumberStyles.HexNumber);
        Console.WriteLine($"Converted {negativeNumber} to {hexValue2.Value} and back to {negativeBigInt}.");
    }
}
// The example displays the following output:
//       Converted 4039543321 to F0C68A19 and back to 4039543321.
//       Converted -255423975 to f0c68a19 and back to -255423975.
Imports System.Globalization
Imports System.Numerics

Public Structure HexValue
    Public Sign As Integer
    Public Value As String
End Structure

Module Example2
    Public Sub Main()
        Dim positiveNumber As UInteger = 4039543321
        Dim negativeNumber As Integer = -255423975

        ' Convert the numbers to hex strings.
        Dim hexValue1, hexValue2 As HexValue
        hexValue1.Value = positiveNumber.ToString("X")
        hexValue1.Sign = Math.Sign(positiveNumber)

        hexValue2.Value = Convert.ToString(negativeNumber, 16)
        hexValue2.Sign = Math.Sign(negativeNumber)

        ' Round-trip the hexadecimal values to BigInteger values.
        Dim hexString As String
        Dim positiveBigInt, negativeBigInt As BigInteger

        hexString = CStr(IIf(hexValue1.Sign = 1, "0", "")) + hexValue1.Value
        positiveBigInt = BigInteger.Parse(hexString, NumberStyles.HexNumber)
        Console.WriteLine("Converted {0} to {1} and back to {2}.",
                        positiveNumber, hexValue1.Value, positiveBigInt)

        hexString = CStr(IIf(hexValue2.Sign = 1, "0", "")) + hexValue2.Value
        negativeBigInt = BigInteger.Parse(hexString, NumberStyles.HexNumber)
        Console.WriteLine("Converted {0} to {1} and back to {2}.",
                        negativeNumber, hexValue2.Value, negativeBigInt)

    End Sub
End Module
' The example displays the following output:
'       Converted 4039543321 to F0C68A19 and back to 4039543321.
'       Converted -255423975 to f0c68a19 and back to -255423975.

Construtores

Name Descrição
BigInteger(Byte[])

Inicializa uma nova instância da BigInteger estrutura usando os valores num array de bytes.

BigInteger(Decimal)

Inicializa uma nova instância da BigInteger estrutura usando um Decimal valor.

BigInteger(Double)

Inicializa uma nova instância da BigInteger estrutura usando um valor de ponto flutuante de dupla precisão.

BigInteger(Int32)

Inicializa uma nova instância da BigInteger estrutura usando um valor inteiro assinado de 32 bits.

BigInteger(Int64)

Inicializa uma nova instância da BigInteger estrutura usando um valor inteiro assinado de 64 bits.

BigInteger(ReadOnlySpan<Byte>, Boolean, Boolean)

Inicializa uma nova instância da BigInteger estrutura usando os valores num intervalo de bytes apenas de leitura, indicando opcionalmente a codificação de assinatura e a ordem dos bytes endianness.

BigInteger(Single)

Inicializa uma nova instância da BigInteger estrutura usando um valor de ponto flutuante de precisão simples.

BigInteger(UInt32)

Inicializa uma nova instância da BigInteger estrutura usando um valor inteiro de 32 bits sem sinal.

BigInteger(UInt64)

Inicializa uma nova instância da BigInteger estrutura com um valor inteiro de 64 bits sem sinal.

Propriedades

Name Descrição
IsEven

Indica se o valor do objeto atual BigInteger é um número par.

IsOne

Indica se o valor do objeto atual BigInteger é One.

IsPowerOfTwo

Indica se o valor do objeto atual BigInteger é uma potência de dois.

IsZero

Indica se o valor do objeto atual BigInteger é Zero.

MinusOne

Obtém um valor que representa o número menos um (-1).

One

Obtém um valor que representa o número um (1).

Sign

Obtém um número que indica o signo (negativo, positivo ou zero) do objeto atual BigInteger .

Zero

Obtém um valor que representa o número 0 (zero).

Métodos

Name Descrição
Abs(BigInteger)

Obtém o valor absoluto de um BigInteger objeto.

Add(BigInteger, BigInteger)

Soma dois BigInteger valores e devolve o resultado.

Clamp(BigInteger, BigInteger, BigInteger)

Fixa um valor a um valor mínimo e máximo inclusivo.

Compare(BigInteger, BigInteger)

Compara dois BigInteger valores e devolve um inteiro que indica se o primeiro valor é menor, igual ou maior que o segundo.

CompareTo(BigInteger)

Compara esta instância com uma segunda BigInteger e devolve um inteiro que indica se o valor desta instância é menor, igual ou superior ao valor do objeto especificado.

CompareTo(Int64)

Compara esta instância com um inteiro assinado de 64 bits e devolve um inteiro que indica se o valor desta instância é menor, igual ou superior ao valor do inteiro assinado de 64 bits.

CompareTo(Object)

Compara esta instância com um objeto especificado e devolve um inteiro que indica se o valor desta instância é menor, igual ou superior ao valor do objeto especificado.

CompareTo(UInt64)

Compara esta instância com um inteiro não assinado de 64 bits e devolve um inteiro que indica se o valor desta instância é menor, igual ou superior ao valor do inteiro não assinado de 64 bits.

CopySign(BigInteger, BigInteger)

Copia o sinal de um valor para o sinal de outro valor.

CreateChecked<TOther>(TOther)

Cria uma instância do tipo atual a partir de um valor, lançando uma exceção de overflow para quaisquer valores que estejam fora do intervalo representável do tipo atual.

CreateSaturating<TOther>(TOther)

Cria uma instância do tipo atual a partir de um valor, saturando quaisquer valores que estejam fora do intervalo representável do tipo atual.

CreateTruncating<TOther>(TOther)

Cria uma instância do tipo atual a partir de um valor, truncando quaisquer valores que estejam fora do intervalo representável do tipo atual.

Divide(BigInteger, BigInteger)

Divide um BigInteger valor por outro e devolve o resultado.

DivRem(BigInteger, BigInteger, BigInteger)

Divide um BigInteger valor por outro, devolve o resultado e devolve o restante num parâmetro de saída.

DivRem(BigInteger, BigInteger)

Calcula o quociente e o resto de dois valores.

Equals(BigInteger)

Devolve um valor que indica se a instância atual e um objeto especificado BigInteger têm o mesmo valor.

Equals(Int64)

Devolve um valor que indica se a instância atual e um inteiro assinado de 64 bits têm o mesmo valor.

Equals(Object)

Devolve um valor que indica se a instância atual e um objeto especificado têm o mesmo valor.

Equals(UInt64)

Devolve um valor que indica se a instância atual e um inteiro não assinado de 64 bits têm o mesmo valor.

GetBitLength()

Obtém o número de bits necessários para a representação do complemento dos dois mais curtos da instância atual sem o bit de sinal.

GetByteCount(Boolean)

Obtém o número de bytes que serão produzidos por ToByteArray(Boolean, Boolean) e TryWriteBytes(Span<Byte>, Int32, Boolean, Boolean).

GetHashCode()

Devolve o código hash do objeto atual BigInteger .

GreatestCommonDivisor(BigInteger, BigInteger)

Encontra o maior divisor comum de dois BigInteger valores.

IsEvenInteger(BigInteger)

Determina se um valor representa um número inteiro par.

IsNegative(BigInteger)

Determina se um valor é negativo.

IsOddInteger(BigInteger)

Determina se um valor representa um número inteiro ímpar.

IsPositive(BigInteger)

Determina se um valor é positivo.

IsPow2(BigInteger)

Determina se um valor é uma potência de dois.

LeadingZeroCount(BigInteger)

Calcula o número de zeros à esquerda num valor.

Log(BigInteger, Double)

Devolve o logaritmo de um número especificado numa base especificada.

Log(BigInteger)

Devolve o logaritmo natural (base e) de um número especificado.

Log10(BigInteger)

Devolve o logaritmo base 10 de um número especificado.

Log2(BigInteger)

Calcula o log2 de um valor.

Max(BigInteger, BigInteger)

Devolve o valor maior entre dois BigInteger valores.

MaxMagnitude(BigInteger, BigInteger)

Compara dois valores para calcular qual é maior.

Min(BigInteger, BigInteger)

Devolve o valor mais pequeno de dois BigInteger .

MinMagnitude(BigInteger, BigInteger)

Compara dois valores para calcular qual é menor.

ModPow(BigInteger, BigInteger, BigInteger)

Realiza divisão de módulo num número elevado à potência de outro número.

Multiply(BigInteger, BigInteger)

Devolve o produto de dois BigInteger valores.

Negate(BigInteger)

Anula um valor especificado BigInteger .

Parse(ReadOnlySpan<Byte>, IFormatProvider)

Representa um inteiro assinado arbitrariamente grande.

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

Representa um inteiro assinado arbitrariamente grande.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Divide um intervalo de caracteres num valor.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Converte a representação de um número, contido no espaço especificado de caracteres em só leitura, num estilo especificado para o seu BigInteger equivalente.

Parse(String, IFormatProvider)

Converte a representação da cadeia de um número num formato específico de cultura para o seu BigInteger equivalente.

Parse(String, NumberStyles, IFormatProvider)

Converte a representação em cadeia de um número num estilo especificado e formato específico de cultura para o seu BigInteger equivalente.

Parse(String, NumberStyles)

Converte a representação da cadeia de um número num estilo especificado para o seu BigInteger equivalente.

Parse(String)

Converte a representação da cadeia de um número para o seu BigInteger equivalente.

PopCount(BigInteger)

Calcula o número de bits que estão definidos num valor.

Pow(BigInteger, Int32)

Eleva um BigInteger valor para a potência de um valor especificado.

Remainder(BigInteger, BigInteger)

Realiza divisão inteira em dois BigInteger valores e devolve o resto.

RotateLeft(BigInteger, Int32)

Roda um valor deixado por uma determinada quantia.

RotateRight(BigInteger, Int32)

Roda um valor exatamente por uma determinada quantia.

Subtract(BigInteger, BigInteger)

Subtrai um BigInteger valor a outro e devolve o resultado.

ToByteArray()

Converte um BigInteger valor para um array de bytes.

ToByteArray(Boolean, Boolean)

Devolve o valor disto BigInteger como um array de bytes usando o menor número possível de bytes. Se o valor for zero, devolve um array de um byte cujo elemento é 0x00.

ToString()

Converte o valor numérico do objeto atual BigInteger para a sua representação equivalente em cadeias.

ToString(IFormatProvider)

Converte o valor numérico do objeto atual BigInteger para a sua representação equivalente da cadeia usando a informação de formatação específica da cultura.

ToString(String, IFormatProvider)

Converte o valor numérico do objeto atual BigInteger para a sua representação equivalente de cadeias usando o formato especificado e a informação específica de formato da cultura.

ToString(String)

Converte o valor numérico do objeto atual BigInteger para a sua representação equivalente em cadeia usando o formato especificado.

TrailingZeroCount(BigInteger)

Calcula o número de zeros finais num valor.

TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider)

Representa um inteiro assinado arbitrariamente grande.

TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

Formata esta grande instância inteira num espaço de caracteres.

TryParse(ReadOnlySpan<Byte>, BigInteger)

Representa um inteiro assinado arbitrariamente grande.

TryParse(ReadOnlySpan<Byte>, IFormatProvider, BigInteger)

Representa um inteiro assinado arbitrariamente grande.

TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, BigInteger)

Representa um inteiro assinado arbitrariamente grande.

TryParse(ReadOnlySpan<Char>, BigInteger)

Tenta converter a representação de um número contido no intervalo de caracteres só de leitura especificado para o seu BigInteger equivalente, e retorna um valor que indica se a conversão foi bem-sucedida.

TryParse(ReadOnlySpan<Char>, IFormatProvider, BigInteger)

Tenta separar um intervalo de caracteres num valor.

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigInteger)

Tenta converter a representação da cadeia de um número para o seu BigInteger equivalente e devolve um valor que indica se a conversão foi bem-sucedida.

TryParse(String, BigInteger)

Tenta converter a representação da cadeia de um número para o seu BigInteger equivalente e devolve um valor que indica se a conversão foi bem-sucedida.

TryParse(String, IFormatProvider, BigInteger)

Tenta analisar uma cadeia num valor.

TryParse(String, NumberStyles, IFormatProvider, BigInteger)

Tenta converter a representação em cadeia de um número num estilo especificado e formato específico de cultura para o seu BigInteger equivalente, e retorna um valor que indica se a conversão teve sucesso.

TryWriteBytes(Span<Byte>, Int32, Boolean, Boolean)

Copia o valor disto BigInteger como bytes de complemento de dois little-endian, usando o menor número possível de bytes. Se o valor for zero, gera um byte cujo elemento é 0x00.

Operadores

Name Descrição
Addition(BigInteger, BigInteger)

Soma os valores de dois objetos especificados BigInteger .

BitwiseAnd(BigInteger, BigInteger)

Executa uma operação bit a And bit em dois BigInteger valores.

BitwiseOr(BigInteger, BigInteger)

Executa uma operação bit a Or bit em dois BigInteger valores.

Decrement(BigInteger)

Diminui um BigInteger valor por 1.

Division(BigInteger, BigInteger)

Divide um valor especificado BigInteger por outro valor especificado BigInteger usando divisão inteira.

Equality(BigInteger, BigInteger)

Devolve um valor que indica se os valores de dois BigInteger objetos são iguais.

Equality(BigInteger, Int64)

Devolve um valor que indica se um BigInteger valor e um valor inteiro longo assinado são iguais.

Equality(BigInteger, UInt64)

Devolve um valor que indica se um BigInteger valor e um valor inteiro longo não assinado são iguais.

Equality(Int64, BigInteger)

Devolve um valor que indica se um valor inteiro longo assinado e um BigInteger valor são iguais.

Equality(UInt64, BigInteger)

Devolve um valor que indica se um valor inteiro longo não assinado e um BigInteger valor são iguais.

ExclusiveOr(BigInteger, BigInteger)

Executa uma operação bit a bit Or exclusiva (XOr) sobre dois BigInteger valores.

Explicit(BFloat16 to BigInteger)

Representa um inteiro assinado arbitrariamente grande.

Explicit(BigInteger to BFloat16)

Representa um inteiro assinado arbitrariamente grande.

Explicit(BigInteger to Byte)

Define uma conversão explícita de um BigInteger objeto para um valor de byte sem sinal.

Explicit(BigInteger to Char)

Converte explicitamente um inteiro grande num Char valor.

Explicit(BigInteger to Decimal)

Define uma conversão explícita de um BigInteger objeto num Decimal valor.

Explicit(BigInteger to Double)

Define uma conversão explícita de um BigInteger objeto num Double valor.

Explicit(BigInteger to Half)

Converte explicitamente um inteiro grande num Half valor.

Explicit(BigInteger to Int128)

Converte explicitamente um inteiro grande num Int128 valor.

Explicit(BigInteger to Int16)

Define uma conversão explícita de um BigInteger objeto para um valor inteiro assinado de 16 bits.

Explicit(BigInteger to Int32)

Define uma conversão explícita de um BigInteger objeto para um valor inteiro assinado de 32 bits.

Explicit(BigInteger to Int64)

Define uma conversão explícita de um BigInteger objeto para um valor inteiro assinado de 64 bits.

Explicit(BigInteger to IntPtr)

Converte explicitamente um inteiro grande num IntPtr valor.

Explicit(BigInteger to SByte)

Define uma conversão explícita de um BigInteger objeto para um valor assinado de 8 bits.

Esta API não está em conformidade com CLS. A alternativa conforme é Int16.

Explicit(BigInteger to Single)

Define uma conversão explícita de um BigInteger objeto para um valor de ponto flutuante de precisão simples.

Explicit(BigInteger to UInt128)

Converte explicitamente um inteiro grande num UInt128 valor.

Explicit(BigInteger to UInt16)

Define uma conversão explícita de um BigInteger objeto para um valor inteiro de 16 bits sem sinal.

Esta API não está em conformidade com CLS. A alternativa conforme é Int32.

Explicit(BigInteger to UInt32)

Define uma conversão explícita de um BigInteger objeto para um valor inteiro de 32 bits sem sinal.

Esta API não está em conformidade com CLS. A alternativa conforme é Int64.

Explicit(BigInteger to UInt64)

Define uma conversão explícita de um BigInteger objeto para um valor inteiro não assinado de 64 bits.

Esta API não está em conformidade com CLS. A alternativa conforme é Double.

Explicit(BigInteger to UIntPtr)

Converte explicitamente um inteiro grande num UIntPtr valor.

Explicit(Complex to BigInteger)

Converte explicitamente um Complex valor num inteiro grande.

Explicit(Decimal to BigInteger)

Define uma conversão explícita de um Decimal objeto num BigInteger valor.

Explicit(Double to BigInteger)

Define uma conversão explícita de um Double valor para um BigInteger valor.

Explicit(Half to BigInteger)

Converte explicitamente um Half valor num inteiro grande.

Explicit(Single to BigInteger)

Define uma conversão explícita de um Single valor para um BigInteger valor.

GreaterThan(BigInteger, BigInteger)

Devolve um valor que indica se um BigInteger valor é maior do que outro BigInteger valor.

GreaterThan(BigInteger, Int64)

Devolve um valor que indica se a BigInteger é maior do que um valor inteiro assinado de 64 bits.

GreaterThan(BigInteger, UInt64)

Devolve um valor que indica se um BigInteger valor é maior do que um inteiro sem sinal de 64 bits.

GreaterThan(Int64, BigInteger)

Devolve um valor que indica se um inteiro com sinal de 64 bits é maior do que um BigInteger valor.

GreaterThan(UInt64, BigInteger)

Devolve um valor que indica se um BigInteger valor é maior do que um inteiro sem sinal de 64 bits.

GreaterThanOrEqual(BigInteger, BigInteger)

Devolve um valor que indica se um BigInteger valor é maior ou igual a outro BigInteger valor.

GreaterThanOrEqual(BigInteger, Int64)

Devolve um valor que indica se um BigInteger valor é maior ou igual a um valor inteiro assinado de 64 bits.

GreaterThanOrEqual(BigInteger, UInt64)

Devolve um valor que indica se um BigInteger valor é maior ou igual a um valor inteiro sem sinal de 64 bits.

GreaterThanOrEqual(Int64, BigInteger)

Devolve um valor que indica se um inteiro com sinal de 64 bits é maior ou igual a um BigInteger valor.

GreaterThanOrEqual(UInt64, BigInteger)

Devolve um valor que indica se um inteiro sem sinal de 64 bits é maior ou igual a um BigInteger valor.

Implicit(Byte to BigInteger)

Define uma conversão implícita de um byte sem assinatura num BigInteger valor.

Implicit(Char to BigInteger)

Implicitamente converte um Char valor num inteiro grande.

Implicit(Int128 to BigInteger)

Implicitamente converte um Int128 valor num inteiro grande.

Implicit(Int16 to BigInteger)

Define uma conversão implícita de um inteiro assinado de 16 bits num BigInteger valor.

Implicit(Int32 to BigInteger)

Define uma conversão implícita de um inteiro de 32 bits assinados num BigInteger valor.

Implicit(Int64 to BigInteger)

Define uma conversão implícita de um inteiro assinado de 64 bits num BigInteger valor.

Implicit(IntPtr to BigInteger)

Implicitamente converte um IntPtr valor num inteiro grande.

Implicit(SByte to BigInteger)

Define uma conversão implícita de um inteiro com sinal de 8 bits num BigInteger valor.

Esta API não está em conformidade com CLS. A alternativa conforme é BigInteger(Int32).

Implicit(UInt128 to BigInteger)

Implicitamente converte um UInt128 valor num inteiro grande.

Implicit(UInt16 to BigInteger)

Define uma conversão implícita de um inteiro sem sinal de 16 bits para um BigInteger valor.

Esta API não está em conformidade com CLS. A alternativa conforme é Implicit(Int32 to BigInteger).

Implicit(UInt32 to BigInteger)

Define uma conversão implícita de um inteiro sem sinal de 32 bits para um BigInteger valor.

Esta API não está em conformidade com CLS. A alternativa conforme é Implicit(Int64 to BigInteger).

Implicit(UInt64 to BigInteger)

Define uma conversão implícita de um inteiro sem sinal de 64 bits para um BigInteger valor.

Esta API não está em conformidade com CLS. A alternativa conforme é Double.

Implicit(UIntPtr to BigInteger)

Implicitamente converte um UIntPtr valor num inteiro grande.

Increment(BigInteger)

Incrementa um BigInteger valor em 1.

Inequality(BigInteger, BigInteger)

Devolve um valor que indica se dois BigInteger objetos têm valores diferentes.

Inequality(BigInteger, Int64)

Devolve um valor que indica se um BigInteger valor e um inteiro assinado de 64 bits não são iguais.

Inequality(BigInteger, UInt64)

Devolve um valor que indica se um BigInteger valor e um inteiro não assinado de 64 bits não são iguais.

Inequality(Int64, BigInteger)

Devolve um valor que indica se um inteiro assinado de 64 bits e um BigInteger valor não são iguais.

Inequality(UInt64, BigInteger)

Devolve um valor que indica se um inteiro sem sinal de 64 bits e um BigInteger valor não são iguais.

LeftShift(BigInteger, Int32)

Desloca um BigInteger valor um número especificado de bits para a esquerda.

LessThan(BigInteger, BigInteger)

Devolve um valor que indica se um BigInteger valor é inferior a outro BigInteger valor.

LessThan(BigInteger, Int64)

Devolve um valor que indica se um BigInteger valor é inferior a um inteiro assinado de 64 bits.

LessThan(BigInteger, UInt64)

Devolve um valor que indica se um BigInteger valor é menor que um inteiro sem sinal de 64 bits.

LessThan(Int64, BigInteger)

Devolve um valor que indica se um inteiro com sinal de 64 bits é inferior a um BigInteger valor.

LessThan(UInt64, BigInteger)

Devolve um valor que indica se um inteiro não assinado de 64 bits é inferior a um BigInteger valor.

LessThanOrEqual(BigInteger, BigInteger)

Devolve um valor que indica se um BigInteger valor é menor ou igual a outro BigInteger valor.

LessThanOrEqual(BigInteger, Int64)

Devolve um valor que indica se um BigInteger valor é menor ou igual a um inteiro com sinal de 64 bits.

LessThanOrEqual(BigInteger, UInt64)

Devolve um valor que indica se um BigInteger valor é menor ou igual a um inteiro sem sinal de 64 bits.

LessThanOrEqual(Int64, BigInteger)

Devolve um valor que indica se um inteiro assinado de 64 bits é menor ou igual a um BigInteger valor.

LessThanOrEqual(UInt64, BigInteger)

Devolve um valor que indica se um inteiro sem sinal de 64 bits é menor ou igual a um BigInteger valor.

Modulus(BigInteger, BigInteger)

Devolve o restante que resulta da divisão com dois valores especificados BigInteger .

Multiply(BigInteger, BigInteger)

Multiplica dois valores especificados BigInteger .

OnesComplement(BigInteger)

Devolve o complemento bit a bit de um BigInteger valor.

RightShift(BigInteger, Int32)

Desloca um BigInteger valor um número especificado de bits para a direita.

Subtraction(BigInteger, BigInteger)

Subtrai um BigInteger valor de outro BigInteger valor.

UnaryNegation(BigInteger)

Nega um valor BigInteger especificado.

UnaryPlus(BigInteger)

Devolve o valor do BigInteger operando. (O sinal do operando mantém-se inalterado.)

UnsignedRightShift(BigInteger, Int32)

Desloca um valor para a direita numa determinada quantia.

Implementações de Interface Explícita

Name Descrição
IAdditiveIdentity<BigInteger,BigInteger>.AdditiveIdentity

Obtém a identidade aditiva do tipo atual.

IBinaryInteger<BigInteger>.GetByteCount()

Obtém o número de bytes que serão escritos como parte de TryWriteLittleEndian(Span<Byte>, Int32).

IBinaryInteger<BigInteger>.GetShortestBitLength()

Obtém o comprimento, em bits, da representação do complemento dos dois mais curtos do valor atual.

IBinaryInteger<BigInteger>.Log10(BigInteger)

Representa um inteiro assinado arbitrariamente grande.

IBinaryInteger<BigInteger>.TryReadBigEndian(ReadOnlySpan<Byte>, Boolean, BigInteger)

Representa um inteiro assinado arbitrariamente grande.

IBinaryInteger<BigInteger>.TryReadLittleEndian(ReadOnlySpan<Byte>, Boolean, BigInteger)

Representa um inteiro assinado arbitrariamente grande.

IBinaryInteger<BigInteger>.TryWriteBigEndian(Span<Byte>, Int32)

Tenta escrever o valor atual, em formato big-endian, para um determinado intervalo.

IBinaryInteger<BigInteger>.TryWriteLittleEndian(Span<Byte>, Int32)

Tenta escrever o valor atual, em formato little-endian, num determinado intervalo.

IBinaryNumber<BigInteger>.AllBitsSet

Obtém uma instância do tipo binário em que todos os bits estão definidos.

IComparable.CompareTo(Object)

Compara esta instância com um objeto especificado e devolve um inteiro que indica se o valor desta instância é menor, igual ou superior ao valor do objeto especificado.

IMultiplicativeIdentity<BigInteger,BigInteger>.MultiplicativeIdentity

Obtém a identidade multiplicativa do tipo atual.

INumber<BigInteger>.MaxNumber(BigInteger, BigInteger)

Compara dois valores para calcular qual é maior e devolve o outro valor se uma entrada for NaN.

INumber<BigInteger>.MinNumber(BigInteger, BigInteger)

Compara dois valores para calcular qual é menor e devolve o outro valor se uma entrada for NaN.

INumber<BigInteger>.Sign(BigInteger)

Calcula o sinal de um valor.

INumberBase<BigInteger>.IsCanonical(BigInteger)

Determina se um valor está na sua representação canónica.

INumberBase<BigInteger>.IsComplexNumber(BigInteger)

Determina se um valor representa um número complexo.

INumberBase<BigInteger>.IsFinite(BigInteger)

Determina se um valor é finito.

INumberBase<BigInteger>.IsImaginaryNumber(BigInteger)

Determina se um valor representa um número puramente imaginário.

INumberBase<BigInteger>.IsInfinity(BigInteger)

Determina se um valor é infinito.

INumberBase<BigInteger>.IsInteger(BigInteger)

Determina se um valor representa um número inteiro.

INumberBase<BigInteger>.IsNaN(BigInteger)

Determina se um valor é NaN.

INumberBase<BigInteger>.IsNegativeInfinity(BigInteger)

Determina se um valor é menos infinito.

INumberBase<BigInteger>.IsNormal(BigInteger)

Determina se um valor é normal.

INumberBase<BigInteger>.IsPositiveInfinity(BigInteger)

Determina se um valor é infinito positivo.

INumberBase<BigInteger>.IsRealNumber(BigInteger)

Determina se um valor representa um número real.

INumberBase<BigInteger>.IsSubnormal(BigInteger)

Determina se um valor é subnormal.

INumberBase<BigInteger>.IsZero(BigInteger)

Determina se um valor é zero.

INumberBase<BigInteger>.MaxMagnitudeNumber(BigInteger, BigInteger)

Compara dois valores para calcular qual tem a maior magnitude e devolve o outro valor se uma entrada for NaN.

INumberBase<BigInteger>.MinMagnitudeNumber(BigInteger, BigInteger)

Compara dois valores para calcular que tem a magnitude menor e devolve o outro valor se uma entrada for NaN.

INumberBase<BigInteger>.MultiplyAddEstimate(BigInteger, BigInteger, BigInteger)

Calcula uma estimativa de (left * right) + . addend

INumberBase<BigInteger>.Radix

Obtém a raiz, ou base, para o tipo.

INumberBase<BigInteger>.TryConvertFromChecked<TOther>(TOther, BigInteger)

Representa um inteiro assinado arbitrariamente grande.

INumberBase<BigInteger>.TryConvertFromSaturating<TOther>(TOther, BigInteger)

Representa um inteiro assinado arbitrariamente grande.

INumberBase<BigInteger>.TryConvertFromTruncating<TOther>(TOther, BigInteger)

Representa um inteiro assinado arbitrariamente grande.

INumberBase<BigInteger>.TryConvertToChecked<TOther>(BigInteger, TOther)

Tenta converter uma instância do tipo atual para outro tipo, lançando uma exceção de overflow para quaisquer valores que estejam fora do intervalo representável do tipo atual.

INumberBase<BigInteger>.TryConvertToSaturating<TOther>(BigInteger, TOther)

Tenta converter uma instância do tipo atual para outro tipo, saturando quaisquer valores que estejam fora do intervalo representável do tipo atual.

INumberBase<BigInteger>.TryConvertToTruncating<TOther>(BigInteger, TOther)

Tenta converter uma instância do tipo atual para outro tipo, truncando quaisquer valores que estejam fora do intervalo representável do tipo atual.

ISignedNumber<BigInteger>.NegativeOne

Obtém o valor -1 do tipo.

Aplica-se a