BigInteger Estructura

Definición

Representa un entero con signo de tamaño arbitrario 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)
Herencia
BigInteger
Atributos
Implementaciones
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>

Comentarios

El BigInteger tipo es un tipo inmutable que representa un entero arbitrariamente grande cuyo valor en teoría no tiene límites superiores o inferiores. Los miembros del tipo BigInteger son estrechamente paralelos a los de otros tipos enteros (los tipos Byte, Int16, Int32, Int64, SByte, UInt16, UInt32 y UInt64). Este tipo difiere de los otros tipos enteros de .NET, que tienen un intervalo indicado por sus MinValue propiedades y MaxValue .

Note

Dado que el BigInteger tipo es inmutable (vea Mutabilidad) y porque no tiene límites superiores o inferiores, se puede lanzar un OutOfMemoryException por cualquier operación que provoque que un BigInteger valor se vuelva excesivamente grande.

Instanciar un objeto BigInteger

Puede crear instancias de un BigInteger objeto de varias maneras:

  • Puede usar la new palabra clave y proporcionar cualquier valor entero o de punto flotante como parámetro para el BigInteger constructor. (Los valores de punto flotante se truncan antes de asignarlos a BigInteger.) En el siguiente ejemplo se muestra cómo usar la palabra reservada new para instanciar valores 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
    
  • Puede declarar una BigInteger variable y asignarle un valor igual que lo haría con cualquier tipo numérico, siempre que ese valor sea un tipo entero. En el ejemplo siguiente se usa la asignación para crear un valor BigInteger a partir de un Int64.

    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
    
  • Puede asignar un valor decimal o de punto flotante a un objeto BigInteger si hace una conversión explícita del valor o lo convierte primero. En el ejemplo siguiente, se convierten explícitamente un valor de Double y otro de Decimal en un BigInteger, en C# y Visual Basic respectivamente.

    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
    

Estos métodos permiten crear instancias de un BigInteger objeto cuyo valor está en el intervalo de uno de los tipos numéricos existentes solo. Puede crear una instancia de un BigInteger objeto cuyo valor puede superar el intervalo de los tipos numéricos existentes de una de estas tres maneras:

  • Puede usar la new palabra clave y proporcionar una matriz de bytes de cualquier tamaño al BigInteger.BigInteger constructor. Por ejemplo:

    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).
    
  • Puede llamar a los métodos Parse o TryParse para convertir la representación de cadena de un número en un BigInteger. Por ejemplo:

    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
    
  • Puede llamar a un static método (Shared en Visual Basic) BigInteger que realiza alguna operación en una expresión numérica y devuelve un resultado calculado BigInteger . En el ejemplo siguiente se realiza mediante el cubing UInt64.MaxValue y la asignación del 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
    

El valor no inicializado de un BigInteger es Zero.

Realización de operaciones en valores de BigInteger

Puede usar una instancia de BigInteger como cualquier otro tipo integral. BigInteger sobrecarga los operadores numéricos estándar para permitirle realizar operaciones matemáticas básicas, como suma, resta, división, multiplicación y negación unaria. También puede usar los operadores numéricos estándar para comparar dos BigInteger valores entre sí. Al igual que los otros tipos enteros, BigInteger también admite los operadores bit a bit And, Or, XOr, así como el desplazamiento a la izquierda y el desplazamiento a la derecha. En el caso de los lenguajes que no admiten operadores personalizados, la BigInteger estructura también proporciona métodos equivalentes para realizar operaciones matemáticas. Entre ellos se incluyen Add, Divide, MultiplyNegate, , Subtracty otros.

Muchos miembros de la BigInteger estructura corresponden directamente a los miembros de los otros tipos enteros. Además, BigInteger agrega miembros como los siguientes:

Muchos de estos miembros adicionales corresponden a los miembros de la Math clase , que proporciona la funcionalidad para trabajar con los tipos numéricos primitivos.

Mutabilidad

En el ejemplo siguiente se crea una instancia de un BigInteger objeto y, a continuación, se incrementa su valor en uno.

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)

Aunque este ejemplo parece modificar el valor del objeto existente, este no es el caso. BigInteger Los objetos son inmutables, lo que significa que, internamente, Common Language Runtime crea realmente un nuevo BigInteger objeto y lo asigna un valor uno mayor que su valor anterior. A continuación, este nuevo objeto se devuelve al autor de la llamada.

Note

Los otros tipos numéricos de .NET también son inmutables. Sin embargo, dado que el BigInteger tipo no tiene límites superiores o inferiores, sus valores pueden crecer extremadamente grandes y tener un impacto medible en el rendimiento.

Aunque este proceso es transparente para el autor de la llamada, incurre en una penalización de rendimiento. En algunos casos, especialmente cuando se realizan operaciones repetidas en un bucle en valores muy grandes BigInteger , esa penalización de rendimiento puede ser significativa. Por ejemplo, en el ejemplo siguiente, una operación se realiza repetidamente hasta un millón de veces y un BigInteger valor se incrementa en uno cada vez que la operación se realiza correctamente.

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

En tal caso, puede mejorar el rendimiento realizando todas las asignaciones intermedias a una Int32 variable. A continuación, se puede asignar el BigInteger valor final de la variable al objeto cuando se cierra el bucle. Esto se muestra en el ejemplo siguiente.

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

Matrices de bytes y cadenas hexadecimales

Si convierte valores BigInteger en matrices de bytes o si convierte matrices de bytes en valores BigInteger, debe tener en cuenta el orden de bytes. La BigInteger estructura espera que los bytes individuales de una matriz de bytes aparezcan en formato little-endian (es decir, los bytes de orden inferior del valor preceden a los bytes de orden superior). Puede realizar un recorrido de ida y vuelta de un BigInteger valor llamando al ToByteArray método y pasando la matriz de bytes resultante al BigInteger(Byte[]) constructor, como se muestra en el ejemplo siguiente.

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 crear instancias de un valor BigInteger de una matriz de bytes que represente un valor de algún otro tipo entero, puede pasar el valor entero al método BitConverter.GetBytes y, a continuación, pasar la matriz de bytes resultante al constructor BigInteger(Byte[]). En el siguiente ejemplo se instancia un valor BigInteger a partir de un array de bytes que representa un valor Int16.

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

En la estructura BigInteger se supone que los valores negativos se almacenan mediante la representación complementaria de dos. Dado que la BigInteger estructura representa un valor numérico sin longitud fija, el BigInteger(Byte[]) constructor siempre interpreta el bit más significativo del último byte de la matriz como un bit de signo. Para evitar que el constructor BigInteger(Byte[]) confunda la representación en complemento a dos de un valor negativo con la representación en signo y magnitud de un valor positivo, los valores positivos en los que normalmente se activaría el bit más significativo del último byte de la matriz de bytes deben incluir un byte adicional cuyo valor sea 0. Por ejemplo, 0xC0 0xBD 0xF0 0xFF es la representación hexadecimal little-endian de -1.000.000 o 4.293.967.296. Dado que el bit más significativo del último byte de esta matriz está activado, el BigInteger(Byte[]) constructor interpretaría el valor de la matriz de bytes como -1000 000. Para crear una instancia de un BigInteger cuyo valor es positivo, se debe pasar a un constructor una matriz de bytes cuyos elementos están 0xC0 0xBD 0xF0 0xFF 0x00. En el siguiente ejemplo se ilustra esto.

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

Las matrices de bytes creadas por el ToByteArray método a partir de valores positivos incluyen este byte de valor cero adicional. Por lo tanto, la estructura BigInteger puede realizar un intercambio exitoso de valores de ida y vuelta al asignarlos a matrices de bytes y luego restaurarlos desde estas, como se muestra en el ejemplo siguiente.

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

Sin embargo, es posible que deba agregar este byte de valor cero adicional a matrices de bytes creadas dinámicamente por el desarrollador o que devuelven los métodos que convierten enteros sin signo en matrices de bytes (como BitConverter.GetBytes(UInt16), BitConverter.GetBytes(UInt32)y BitConverter.GetBytes(UInt64)).

Al analizar una cadena hexadecimal, los métodos BigInteger.Parse(String, NumberStyles) y BigInteger.Parse(String, NumberStyles, IFormatProvider) asumen que si se establece el bit más significativo del primer byte de la cadena, o si el primer dígito hexadecimal de la cadena representa los cuatro bits inferiores del valor de un byte, el valor se representa mediante la representación en complemento a dos. Por ejemplo, "FF01" y "F01" representan el valor decimal -255. Para diferenciar los valores positivos de los valores negativos, los valores positivos deben incluir un cero inicial. Las sobrecargas pertinentes del método ToString, cuando se les pasa la cadena de formato "X", agregan un cero inicial a la cadena hexadecimal devuelta para los valores positivos. Esto permite realizar un recorrido de ida y vuelta de los valores BigInteger mediante los métodos ToString y Parse, como se muestra en el ejemplo siguiente.

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.

Sin embargo, las cadenas hexadecimales creadas llamando a los ToString métodos de los otros tipos enteros o las sobrecargas del ToString método que incluyen un toBase parámetro no indican el signo del valor o el tipo de datos de origen desde el que se derivaba la cadena hexadecimal. La instanciación correcta de un valor BigInteger a partir de dicha cadena requiere algo de lógica adicional. En el ejemplo siguiente se proporciona una posible implementación.

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.

Constructores

Nombre Description
BigInteger(Byte[])

Inicializa una nueva instancia de la BigInteger estructura mediante los valores de una matriz de bytes.

BigInteger(Decimal)

Inicializa una nueva instancia de la BigInteger estructura mediante un Decimal valor .

BigInteger(Double)

Inicializa una nueva instancia de la BigInteger estructura mediante un valor de punto flotante de precisión doble.

BigInteger(Int32)

Inicializa una nueva instancia de la BigInteger estructura con un valor entero de 32 bits con signo.

BigInteger(Int64)

Inicializa una nueva instancia de la BigInteger estructura mediante un valor entero con signo de 64 bits.

BigInteger(ReadOnlySpan<Byte>, Boolean, Boolean)

Inicializa una nueva instancia de la BigInteger estructura mediante los valores de un intervalo de bytes de solo lectura y, opcionalmente, indica la codificación de firma y el orden de bytes de endianness.

BigInteger(Single)

Inicializa una nueva instancia de la BigInteger estructura mediante un valor de punto flotante de precisión única.

BigInteger(UInt32)

Inicializa una nueva instancia de la BigInteger estructura con un valor entero de 32 bits sin signo.

BigInteger(UInt64)

Inicializa una nueva instancia de la BigInteger estructura con un valor entero de 64 bits sin signo.

Propiedades

Nombre Description
IsEven

Indica si el valor del objeto actual BigInteger es un número par.

IsOne

Indica si el valor del objeto actual BigInteger es One.

IsPowerOfTwo

Indica si el valor del objeto actual BigInteger es una potencia de dos.

IsZero

Indica si el valor del objeto actual BigInteger es Zero.

MinusOne

Obtiene un valor que representa el número negativo uno (-1).

One

Obtiene un valor que representa el número uno (1).

Sign

Obtiene un número que indica el signo (negativo, positivo o cero) del objeto actual BigInteger .

Zero

Obtiene un valor que representa el número 0 (cero).

Métodos

Nombre Description
Abs(BigInteger)

Obtiene el valor absoluto de un BigInteger objeto .

Add(BigInteger, BigInteger)

Agrega dos BigInteger valores y devuelve el resultado.

Clamp(BigInteger, BigInteger, BigInteger)

Fija un valor en un valor mínimo inclusivo y máximo.

Compare(BigInteger, BigInteger)

Compara dos BigInteger valores y devuelve un entero que indica si el primer valor es menor, igual o mayor que el segundo valor.

CompareTo(BigInteger)

Compara esta instancia con un segundo BigInteger y devuelve un entero que indica si el valor de esta instancia es menor, igual o mayor que el valor del objeto especificado.

CompareTo(Int64)

Compara esta instancia con un entero de 64 bits con signo y devuelve un entero que indica si el valor de esta instancia es menor, igual o mayor que el valor del entero de 64 bits con signo.

CompareTo(Object)

Compara esta instancia con un objeto especificado y devuelve un entero que indica si el valor de esta instancia es menor, igual o mayor que el valor del objeto especificado.

CompareTo(UInt64)

Compara esta instancia con un entero de 64 bits sin signo y devuelve un entero que indica si el valor de esta instancia es menor, igual o mayor que el valor del entero de 64 bits sin signo.

CopySign(BigInteger, BigInteger)

Copia el signo de un valor en el signo de otro valor.

CreateChecked<TOther>(TOther)

Crea una instancia del tipo actual a partir de un valor, iniciando una excepción de desbordamiento para los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

CreateSaturating<TOther>(TOther)

Crea una instancia del tipo actual a partir de un valor, saturando los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

CreateTruncating<TOther>(TOther)

Crea una instancia del tipo actual a partir de un valor, truncando los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

Divide(BigInteger, BigInteger)

Divide un BigInteger valor por otro y devuelve el resultado.

DivRem(BigInteger, BigInteger, BigInteger)

Divide un BigInteger valor por otro, devuelve el resultado y devuelve el resto en un parámetro de salida.

DivRem(BigInteger, BigInteger)

Calcula el cociente y el resto de dos valores.

Equals(BigInteger)

Devuelve un valor que indica si la instancia actual y un objeto especificado BigInteger tienen el mismo valor.

Equals(Int64)

Devuelve un valor que indica si la instancia actual y un entero de 64 bits con signo tienen el mismo valor.

Equals(Object)

Devuelve un valor que indica si la instancia actual y un objeto especificado tienen el mismo valor.

Equals(UInt64)

Devuelve un valor que indica si la instancia actual y un entero de 64 bits sin signo tienen el mismo valor.

GetBitLength()

Obtiene el número de bits necesarios para la representación complementaria más corta de dos de la instancia actual sin el bit de signo.

GetByteCount(Boolean)

Obtiene el número de bytes que generará ToByteArray(Boolean, Boolean) y TryWriteBytes(Span<Byte>, Int32, Boolean, Boolean).

GetHashCode()

Devuelve el código hash del objeto actual BigInteger .

GreatestCommonDivisor(BigInteger, BigInteger)

Busca el divisor más común de dos BigInteger valores.

IsEvenInteger(BigInteger)

Determina si un valor representa un número entero par.

IsNegative(BigInteger)

Determina si un valor es negativo.

IsOddInteger(BigInteger)

Determina si un valor representa un número entero impar.

IsPositive(BigInteger)

Determina si un valor es positivo.

IsPow2(BigInteger)

Determina si un valor es una potencia de dos.

LeadingZeroCount(BigInteger)

Calcula el número de ceros iniciales en un valor.

Log(BigInteger, Double)

Devuelve el logaritmo de un número especificado en una base especificada.

Log(BigInteger)

Devuelve el logaritmo natural (base e) de un número especificado.

Log10(BigInteger)

Devuelve el logaritmo base 10 de un número especificado.

Log2(BigInteger)

Calcula el registro2 de un valor.

Max(BigInteger, BigInteger)

Devuelve el mayor de dos BigInteger valores.

MaxMagnitude(BigInteger, BigInteger)

Compara dos valores con el proceso, que es mayor.

Min(BigInteger, BigInteger)

Devuelve el menor de dos BigInteger valores.

MinMagnitude(BigInteger, BigInteger)

Compara dos valores con el proceso, que es menor.

ModPow(BigInteger, BigInteger, BigInteger)

Realiza la división de módulos en un número elevado a la potencia de otro número.

Multiply(BigInteger, BigInteger)

Devuelve el producto de dos BigInteger valores.

Negate(BigInteger)

Niega un valor especificado BigInteger .

Parse(ReadOnlySpan<Byte>, IFormatProvider)

Representa un entero con signo de tamaño arbitrario grande.

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

Representa un entero con signo de tamaño arbitrario grande.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Analiza un intervalo de caracteres en un valor.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Convierte la representación de un número, contenido en el intervalo de solo lectura especificado de caracteres, en un estilo especificado a su BigInteger equivalente.

Parse(String, IFormatProvider)

Convierte la representación de cadena de un número en un formato específico de la referencia cultural especificado en su BigInteger equivalente.

Parse(String, NumberStyles, IFormatProvider)

Convierte la representación de cadena de un número en un estilo y formato específico de la referencia cultural especificados en su BigInteger equivalente.

Parse(String, NumberStyles)

Convierte la representación de cadena de un número en un estilo especificado en su BigInteger equivalente.

Parse(String)

Convierte la representación de cadena de un número en su BigInteger equivalente.

PopCount(BigInteger)

Calcula el número de bits que se establecen en un valor.

Pow(BigInteger, Int32)

Eleva un BigInteger valor a la potencia de un valor especificado.

Remainder(BigInteger, BigInteger)

Realiza la división de enteros en dos BigInteger valores y devuelve el resto.

RotateLeft(BigInteger, Int32)

Gira un valor de izquierda por una cantidad determinada.

RotateRight(BigInteger, Int32)

Gira un valor a la derecha por una cantidad determinada.

Subtract(BigInteger, BigInteger)

Resta un BigInteger valor de otro y devuelve el resultado.

ToByteArray()

Convierte un BigInteger valor en una matriz de bytes.

ToByteArray(Boolean, Boolean)

Devuelve el valor de esto BigInteger como una matriz de bytes con el menor número de bytes posible. Si el valor es cero, devuelve una matriz de un byte cuyo elemento es 0x00.

ToString()

Convierte el valor numérico del objeto actual BigInteger en su representación de cadena equivalente.

ToString(IFormatProvider)

Convierte el valor numérico del objeto actual BigInteger en su representación de cadena equivalente mediante la información de formato específica de la referencia cultural especificada.

ToString(String, IFormatProvider)

Convierte el valor numérico del objeto actual BigInteger en su representación de cadena equivalente mediante el formato especificado y la información de formato específica de la referencia cultural.

ToString(String)

Convierte el valor numérico del objeto actual BigInteger en su representación de cadena equivalente mediante el formato especificado.

TrailingZeroCount(BigInteger)

Calcula el número de ceros finales en un valor.

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

Representa un entero con signo de tamaño arbitrario grande.

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

Da formato a esta gran instancia de entero en un intervalo de caracteres.

TryParse(ReadOnlySpan<Byte>, BigInteger)

Representa un entero con signo de tamaño arbitrario grande.

TryParse(ReadOnlySpan<Byte>, IFormatProvider, BigInteger)

Representa un entero con signo de tamaño arbitrario grande.

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

Representa un entero con signo de tamaño arbitrario grande.

TryParse(ReadOnlySpan<Char>, BigInteger)

Intenta convertir la representación de un número contenido en el intervalo de caracteres de solo lectura especificado, en su BigInteger equivalente y devuelve un valor que indica si la conversión se realizó correctamente.

TryParse(ReadOnlySpan<Char>, IFormatProvider, BigInteger)

Intenta analizar un intervalo de caracteres en un valor.

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

Intenta convertir la representación de cadena de un número en su BigInteger equivalente y devuelve un valor que indica si la conversión se realizó correctamente.

TryParse(String, BigInteger)

Intenta convertir la representación de cadena de un número en su BigInteger equivalente y devuelve un valor que indica si la conversión se realizó correctamente.

TryParse(String, IFormatProvider, BigInteger)

Intenta analizar una cadena en un valor.

TryParse(String, NumberStyles, IFormatProvider, BigInteger)

Intenta convertir la representación de cadena de un número en un estilo especificado y un formato específico de la referencia cultural a su BigInteger equivalente y devuelve un valor que indica si la conversión se realizó correctamente.

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

Copia el valor de este BigInteger valor como bytes de complemento de dos endian, utilizando el menor número de bytes posible. Si el valor es cero, genera un byte cuyo elemento es 0x00.

Operadores

Nombre Description
Addition(BigInteger, BigInteger)

Agrega los valores de dos objetos especificados BigInteger .

BitwiseAnd(BigInteger, BigInteger)

Realiza una operación bit a bit And en dos BigInteger valores.

BitwiseOr(BigInteger, BigInteger)

Realiza una operación bit a bit Or en dos BigInteger valores.

Decrement(BigInteger)

Disminuye un BigInteger valor en 1.

Division(BigInteger, BigInteger)

Divide un valor especificado BigInteger por otro valor especificado BigInteger mediante la división de enteros.

Equality(BigInteger, BigInteger)

Devuelve un valor que indica si los valores de dos BigInteger objetos son iguales.

Equality(BigInteger, Int64)

Devuelve un valor que indica si un BigInteger valor y un valor entero largo con signo son iguales.

Equality(BigInteger, UInt64)

Devuelve un valor que indica si un BigInteger valor y un valor entero largo sin signo son iguales.

Equality(Int64, BigInteger)

Devuelve un valor que indica si un valor entero largo con signo y un BigInteger valor son iguales.

Equality(UInt64, BigInteger)

Devuelve un valor que indica si un valor entero largo sin signo y un BigInteger valor son iguales.

ExclusiveOr(BigInteger, BigInteger)

Realiza una operación exclusiva Or bit a bit (XOr) en dos BigInteger valores.

Explicit(BFloat16 to BigInteger)

Representa un entero con signo de tamaño arbitrario grande.

Explicit(BigInteger to BFloat16)

Representa un entero con signo de tamaño arbitrario grande.

Explicit(BigInteger to Byte)

Define una conversión explícita de un BigInteger objeto a un valor de byte sin signo.

Explicit(BigInteger to Char)

Convierte explícitamente un entero grande en un Char valor.

Explicit(BigInteger to Decimal)

Define una conversión explícita de un BigInteger objeto a un Decimal valor.

Explicit(BigInteger to Double)

Define una conversión explícita de un BigInteger objeto a un Double valor.

Explicit(BigInteger to Half)

Convierte explícitamente un entero grande en un Half valor.

Explicit(BigInteger to Int128)

Convierte explícitamente un entero grande en un Int128 valor.

Explicit(BigInteger to Int16)

Define una conversión explícita de un BigInteger objeto a un valor entero de 16 bits con signo.

Explicit(BigInteger to Int32)

Define una conversión explícita de un BigInteger objeto a un valor entero de 32 bits con signo.

Explicit(BigInteger to Int64)

Define una conversión explícita de un BigInteger objeto a un valor entero con signo de 64 bits.

Explicit(BigInteger to IntPtr)

Convierte explícitamente un entero grande en un IntPtr valor.

Explicit(BigInteger to SByte)

Define una conversión explícita de un BigInteger objeto a un valor de 8 bits con signo.

Esta API no es conforme a CLS. La alternativa compatible es Int16.

Explicit(BigInteger to Single)

Define una conversión explícita de un BigInteger objeto a un valor de punto flotante de precisión sencilla.

Explicit(BigInteger to UInt128)

Convierte explícitamente un entero grande en un UInt128 valor.

Explicit(BigInteger to UInt16)

Define una conversión explícita de un BigInteger objeto a un valor entero de 16 bits sin signo.

Esta API no es conforme a CLS. La alternativa compatible es Int32.

Explicit(BigInteger to UInt32)

Define una conversión explícita de un BigInteger objeto a un valor entero de 32 bits sin signo.

Esta API no es conforme a CLS. La alternativa compatible es Int64.

Explicit(BigInteger to UInt64)

Define una conversión explícita de un BigInteger objeto en un valor entero de 64 bits sin signo.

Esta API no es conforme a CLS. La alternativa compatible es Double.

Explicit(BigInteger to UIntPtr)

Convierte explícitamente un entero grande en un UIntPtr valor.

Explicit(Complex to BigInteger)

Convierte explícitamente un Complex valor en un entero grande.

Explicit(Decimal to BigInteger)

Define una conversión explícita de un Decimal objeto a un BigInteger valor.

Explicit(Double to BigInteger)

Define una conversión explícita de un Double valor a un BigInteger valor.

Explicit(Half to BigInteger)

Convierte explícitamente un Half valor en un entero grande.

Explicit(Single to BigInteger)

Define una conversión explícita de un Single valor a un BigInteger valor.

GreaterThan(BigInteger, BigInteger)

Devuelve un valor que indica si un BigInteger valor es mayor que otro BigInteger valor.

GreaterThan(BigInteger, Int64)

Devuelve un valor que indica si es BigInteger mayor que un valor entero con signo de 64 bits.

GreaterThan(BigInteger, UInt64)

Devuelve un valor que indica si un BigInteger valor es mayor que un entero de 64 bits sin signo.

GreaterThan(Int64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits con signo es mayor que un BigInteger valor.

GreaterThan(UInt64, BigInteger)

Devuelve un valor que indica si un BigInteger valor es mayor que un entero de 64 bits sin signo.

GreaterThanOrEqual(BigInteger, BigInteger)

Devuelve un valor que indica si un BigInteger valor es mayor o igual que otro BigInteger valor.

GreaterThanOrEqual(BigInteger, Int64)

Devuelve un valor que indica si un BigInteger valor es mayor o igual que un valor entero con signo de 64 bits.

GreaterThanOrEqual(BigInteger, UInt64)

Devuelve un valor que indica si un BigInteger valor es mayor o igual que un valor entero de 64 bits sin signo.

GreaterThanOrEqual(Int64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits con signo es mayor o igual que un BigInteger valor.

GreaterThanOrEqual(UInt64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits sin signo es mayor o igual que un BigInteger valor.

Implicit(Byte to BigInteger)

Define una conversión implícita de un byte sin signo en un BigInteger valor.

Implicit(Char to BigInteger)

Convierte implícitamente un Char valor en un entero grande.

Implicit(Int128 to BigInteger)

Convierte implícitamente un Int128 valor en un entero grande.

Implicit(Int16 to BigInteger)

Define una conversión implícita de un entero de 16 bits con signo en un BigInteger valor.

Implicit(Int32 to BigInteger)

Define una conversión implícita de un entero de 32 bits con signo en un BigInteger valor.

Implicit(Int64 to BigInteger)

Define una conversión implícita de un entero de 64 bits con signo en un BigInteger valor.

Implicit(IntPtr to BigInteger)

Convierte implícitamente un IntPtr valor en un entero grande.

Implicit(SByte to BigInteger)

Define una conversión implícita de un entero de 8 bits con signo en un BigInteger valor.

Esta API no es conforme a CLS. La alternativa compatible es BigInteger(Int32).

Implicit(UInt128 to BigInteger)

Convierte implícitamente un UInt128 valor en un entero grande.

Implicit(UInt16 to BigInteger)

Define una conversión implícita de un entero de 16 bits sin signo en un BigInteger valor .

Esta API no es conforme a CLS. La alternativa compatible es Implicit(Int32 to BigInteger).

Implicit(UInt32 to BigInteger)

Define una conversión implícita de un entero de 32 bits sin signo en un BigInteger valor.

Esta API no es conforme a CLS. La alternativa compatible es Implicit(Int64 to BigInteger).

Implicit(UInt64 to BigInteger)

Define una conversión implícita de un entero de 64 bits sin signo en un BigInteger valor.

Esta API no es conforme a CLS. La alternativa compatible es Double.

Implicit(UIntPtr to BigInteger)

Convierte implícitamente un UIntPtr valor en un entero grande.

Increment(BigInteger)

Incrementa un BigInteger valor en 1.

Inequality(BigInteger, BigInteger)

Devuelve un valor que indica si dos BigInteger objetos tienen valores diferentes.

Inequality(BigInteger, Int64)

Devuelve un valor que indica si un BigInteger valor y un entero de 64 bits con signo no son iguales.

Inequality(BigInteger, UInt64)

Devuelve un valor que indica si un BigInteger valor y un entero de 64 bits sin signo no son iguales.

Inequality(Int64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits con signo y un BigInteger valor no son iguales.

Inequality(UInt64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits sin signo y un BigInteger valor no son iguales.

LeftShift(BigInteger, Int32)

Desplaza un BigInteger valor especificado número de bits a la izquierda.

LessThan(BigInteger, BigInteger)

Devuelve un valor que indica si un BigInteger valor es menor que otro BigInteger valor.

LessThan(BigInteger, Int64)

Devuelve un valor que indica si un BigInteger valor es menor que un entero de 64 bits con signo.

LessThan(BigInteger, UInt64)

Devuelve un valor que indica si un BigInteger valor es menor que un entero de 64 bits sin signo.

LessThan(Int64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits con signo es menor que un BigInteger valor.

LessThan(UInt64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits sin signo es menor que un BigInteger valor.

LessThanOrEqual(BigInteger, BigInteger)

Devuelve un valor que indica si un BigInteger valor es menor o igual que otro BigInteger valor.

LessThanOrEqual(BigInteger, Int64)

Devuelve un valor que indica si un BigInteger valor es menor o igual que un entero de 64 bits con signo.

LessThanOrEqual(BigInteger, UInt64)

Devuelve un valor que indica si un BigInteger valor es menor o igual que un entero de 64 bits sin signo.

LessThanOrEqual(Int64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits con signo es menor o igual que un BigInteger valor.

LessThanOrEqual(UInt64, BigInteger)

Devuelve un valor que indica si un entero de 64 bits sin signo es menor o igual que un BigInteger valor.

Modulus(BigInteger, BigInteger)

Devuelve el resto resultante de la división con dos valores especificados BigInteger .

Multiply(BigInteger, BigInteger)

Multiplica dos valores especificados BigInteger .

OnesComplement(BigInteger)

Devuelve el complemento bit a bit de un BigInteger valor.

RightShift(BigInteger, Int32)

Desplaza un valor de un BigInteger número especificado de bits a la derecha.

Subtraction(BigInteger, BigInteger)

Resta un BigInteger valor de otro BigInteger valor.

UnaryNegation(BigInteger)

Niega un valor BigInteger especificado.

UnaryPlus(BigInteger)

Devuelve el valor del BigInteger operando. (El signo del operando no cambia).

UnsignedRightShift(BigInteger, Int32)

Desplaza un valor hacia la derecha por una cantidad determinada.

Implementaciones de interfaz explícitas

Nombre Description
IAdditiveIdentity<BigInteger,BigInteger>.AdditiveIdentity

Obtiene la identidad de suma del tipo actual.

IBinaryInteger<BigInteger>.GetByteCount()

Obtiene el número de bytes que se escribirán como parte de TryWriteLittleEndian(Span<Byte>, Int32).

IBinaryInteger<BigInteger>.GetShortestBitLength()

Obtiene la longitud, en bits, de la representación complementaria de dos más corta del valor actual.

IBinaryInteger<BigInteger>.Log10(BigInteger)

Representa un entero con signo de tamaño arbitrario grande.

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

Representa un entero con signo de tamaño arbitrario grande.

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

Representa un entero con signo de tamaño arbitrario grande.

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

Intenta escribir el valor actual, en formato big-endian, en un intervalo determinado.

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

Intenta escribir el valor actual, en formato little-endian, en un intervalo determinado.

IBinaryNumber<BigInteger>.AllBitsSet

Obtiene una instancia del tipo binario en el que se establecen todos los bits.

IComparable.CompareTo(Object)

Compara esta instancia con un objeto especificado y devuelve un entero que indica si el valor de esta instancia es menor, igual o mayor que el valor del objeto especificado.

IMultiplicativeIdentity<BigInteger,BigInteger>.MultiplicativeIdentity

Obtiene la identidad multiplicativa del tipo actual.

INumber<BigInteger>.MaxNumber(BigInteger, BigInteger)

Compara dos valores con el proceso, que es mayor y devuelve el otro valor si una entrada es NaN.

INumber<BigInteger>.MinNumber(BigInteger, BigInteger)

Compara dos valores con el proceso que es menor y devuelve el otro valor si una entrada es NaN.

INumber<BigInteger>.Sign(BigInteger)

Calcula el signo de un valor.

INumberBase<BigInteger>.IsCanonical(BigInteger)

Determina si un valor está en su representación canónica.

INumberBase<BigInteger>.IsComplexNumber(BigInteger)

Determina si un valor representa un número complejo.

INumberBase<BigInteger>.IsFinite(BigInteger)

Determina si un valor es finito.

INumberBase<BigInteger>.IsImaginaryNumber(BigInteger)

Determina si un valor representa un número imaginario puro.

INumberBase<BigInteger>.IsInfinity(BigInteger)

Determina si un valor es infinito.

INumberBase<BigInteger>.IsInteger(BigInteger)

Determina si un valor representa un número entero.

INumberBase<BigInteger>.IsNaN(BigInteger)

Determina si un valor es NaN.

INumberBase<BigInteger>.IsNegativeInfinity(BigInteger)

Determina si un valor es infinito negativo.

INumberBase<BigInteger>.IsNormal(BigInteger)

Determina si un valor es normal.

INumberBase<BigInteger>.IsPositiveInfinity(BigInteger)

Determina si un valor es infinito positivo.

INumberBase<BigInteger>.IsRealNumber(BigInteger)

Determina si un valor representa un número real.

INumberBase<BigInteger>.IsSubnormal(BigInteger)

Determina si un valor es subnormal.

INumberBase<BigInteger>.IsZero(BigInteger)

Determina si un valor es cero.

INumberBase<BigInteger>.MaxMagnitudeNumber(BigInteger, BigInteger)

Compara dos valores con el proceso que tiene la magnitud mayor y devuelve el otro valor si una entrada es NaN.

INumberBase<BigInteger>.MinMagnitudeNumber(BigInteger, BigInteger)

Compara dos valores con el proceso que tiene la magnitud menor y devuelve el otro valor si una entrada es NaN.

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

Calcula una estimación de (left * right) + addend.

INumberBase<BigInteger>.Radix

Obtiene la raíz, o base, para el tipo.

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

Representa un entero con signo de tamaño arbitrario grande.

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

Representa un entero con signo de tamaño arbitrario grande.

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

Representa un entero con signo de tamaño arbitrario grande.

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

Intenta convertir una instancia del tipo actual en otro tipo, iniciando una excepción de desbordamiento para los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

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

Intenta convertir una instancia del tipo actual en otro tipo, saturando los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

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

Intenta convertir una instancia del tipo actual en otro tipo, truncando los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

ISignedNumber<BigInteger>.NegativeOne

Obtiene el valor -1 del tipo .

Se aplica a