BigInteger Struktura

Definice

Představuje libovolné velké celé číslo se signedm.

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)
Dědičnost
BigInteger
Atributy
Implementuje
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>

Poznámky

Typ BigInteger je neměnný typ, který představuje libovolné velké celé číslo, jehož hodnota teoreticky nemá žádné horní nebo dolní hranice. Členové typu BigInteger úzce odpovídají členům jiných integrálních typů (Byte, Int16, Int32, Int64, SByte, UInt16, UInt32 a UInt64 typy). Tento typ se liší od ostatních integrálních typů v .NET, které mají rozsah označený jejich MinValue vlastnostmi a MaxValue vlastnostmi.

Note

BigInteger Vzhledem k tomu, že typ je neměnný (viz Mutability) a protože nemá žádné horní nebo dolní hranice, OutOfMemoryException může být vyvolán pro jakoukoli operaci, která způsobíBigInteger, že hodnota bude příliš velká.

Vytvoření instance objektu BigInteger

Můžete vytvořit instanci objektu BigInteger několika způsoby:

  • Pomocí klíčového slova new můžete zadat jako parametr konstruktoru libovolnou celočíselnou hodnotu nebo hodnotu s pohyblivou desetinnou čárkou BigInteger. (Hodnoty s plovoucí desetinnou čárkou jsou zkráceny před jejich přiřazením k hodnotám BigInteger.) Následující příklad ukazuje, jak pomocí klíčového slova new vytvořit instanci hodnot 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
    
  • Proměnnou BigInteger můžete deklarovat a přiřadit ji stejně jako jakýkoli číselný typ, pokud je tato hodnota celočíselným typem. Následující příklad používá přiřazení k vytvoření BigInteger hodnoty z objektu 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
    
  • Objektu BigInteger můžete přiřadit desetinnou číselnou hodnotu nebo hodnotu s pohyblivou řádovou čárkou, pokud hodnotu nejprve přetypujete nebo převedete. Následující příklad explicitně přetypuje (v jazyce C#) nebo převede (v jazyce Visual Basic) hodnoty Double a Decimal na 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
    

Tyto metody umožňují vytvořit instanci objektu BigInteger , jehož hodnota je v rozsahu jednoho z existujících číselných typů. Můžete vytvořit instanci objektu BigInteger , jehož hodnota může překročit rozsah existujících číselných typů jedním ze tří způsobů:

  • Klíčové slovo new můžete použít a konstruktoru BigInteger.BigInteger poskytnout bajtové pole libovolné velikosti. Příklad:

    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).
    
  • Můžete použít metody Parse nebo TryParse k převodu řetězcové reprezentace čísla na BigInteger. Příklad:

    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
    
  • Můžete volat metodu static (Shared v jazyce Visual Basic), BigInteger která provádí určitou operaci s číselným výrazem a vrací počítaný BigInteger výsledek. Následující příklad to provede cubing UInt64.MaxValue a přiřazení výsledku k .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
    

Neinicializovaná hodnota BigInteger je Zero.

Provádění operací s hodnotami BigInteger

Instanci můžete použít BigInteger stejně jako jakýkoli jiný celočíselný typ. BigInteger přetěžuje standardní číselné operátory, které umožňují provádět základní matematické operace, jako jsou sčítání, odčítání, dělení, násobení a unární negace. Standardní číselné operátory můžete použít také k porovnání dvou BigInteger hodnot mezi sebou. Stejně jako ostatní integrální typy podporuje BigInteger také bitové operátory And, Or, XOr, levý posun a pravý posun. U jazyků, které nepodporují vlastní operátory, BigInteger poskytuje struktura také ekvivalentní metody pro provádění matematických operací. Patří mezi ně Add, Divide, Multiply, Negate, Subtract a několik dalších.

Mnoho členů BigInteger struktury přímo odpovídá členům ostatních integrálních typů. Kromě toho přidá členy, jako například: BigInteger

Mnoho z těchto dalších členů odpovídá členům Math třídy, což poskytuje funkce pro práci s primitivními číselnými typy.

Proměnlivost

Následující příklad vytvoří instanci objektu BigInteger a potom zvýší jeho hodnotu o jednu.

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)

I když se tento příklad jeví jako změna hodnoty existujícího objektu, nejedná se o případ. BigInteger objekty jsou neměnné, což znamená, že modul CLR (Common Language Runtime) ve skutečnosti vytvoří nový BigInteger objekt a přiřadí mu hodnotu větší než předchozí hodnota. Tento nový objekt je pak vrácen volajícímu.

Note

Ostatní číselné typy v .NET jsou také neměnné. Vzhledem k tomu, že BigInteger typ nemá žádné horní nebo dolní hranice, mohou jeho hodnoty růst extrémně velké a mají měřitelný dopad na výkon.

I když je tento proces pro volajícího transparentní, způsobuje to snížení výkonu. V některých případech, zejména pokud jsou opakované operace prováděny ve smyčce s velmi velkými BigInteger hodnotami, může dojít k významnému snížení výkonu. Například v následujícím příkladu se operace provádí opakovaně až milionkrát a BigInteger při každém úspěšném dokončení operace se zvýší o jednu hodnotu.

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

V takovém případě můžete zvýšit výkon provedením všech přechodných přiřazení k Int32 proměnné. Konečná hodnota proměnné se pak může přiřadit k objektu BigInteger , když smyčka skončí. V následujícím příkladu je uvedena ukázka.

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

Bajtová pole a šestnáctkové řetězce

Při převodu BigInteger hodnot na bajtová pole nebo při převodu bajtů na BigInteger hodnoty je nutné zvážit pořadí bajtů. Struktura BigInteger očekává, že se jednotlivé bajty v bajtovém poli zobrazí v malém endovém pořadí (tj. bajty nižšího pořadí hodnoty před bajty vyššího řádu). Hodnotu BigInteger můžete převést voláním metody ToByteArray a následným předáním výsledného bajtového pole do konstruktoru BigInteger(Byte[]), jak ukazuje následující příklad.

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

Chcete-li vytvořit BigInteger instanci hodnoty z bajtového pole představující hodnotu jiného celočíselného typu, můžete předat celočíselnou hodnotu BitConverter.GetBytes metodě a pak předat výsledné bajtové pole konstruktoru BigInteger(Byte[]) . Následující příklad instancuje BigInteger hodnotu z bajtového pole, které reprezentuje Int16 hodnotu.

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

Struktura BigInteger předpokládá, že záporné hodnoty jsou uloženy pomocí reprezentace doplňku dvou. Vzhledem k tomu, že BigInteger struktura představuje číselnou hodnotu bez pevné délky, BigInteger(Byte[]) konstruktor vždy interpretuje nejvýznamnější bit posledního bajtu v poli jako bit znaménka. Aby se zabránilo konstruktoru BigInteger(Byte[]) zmatení reprezentace záporné hodnoty ve dvojkovém doplňku s reprezentací kladné hodnoty se znaménkem a velikostí, kladné hodnoty, ve kterých by byl obvykle nastaven nejvýznamnější bit posledního bajtu v poli bajtů, by měly obsahovat další bajt, jehož hodnota je 0. Například 0xC0 0xBD 0xF0 0xFF je hexadecimální reprezentace v formátu malého endian buď -1 000 000, nebo 4 293 967 296. Vzhledem k tomu, že nejvýznamnější bit posledního bajtu v tomto poli je zapnutý, bude hodnota bajtového pole interpretována konstruktorem BigInteger(Byte[]) jako -1 000 000. Chcete-li vytvořit BigInteger s kladnou hodnotou, musí být do konstruktoru předáno bajtové pole, jehož prvky jsou 0xC0 0xBD 0xF0 0xFF 0x00. Ilustruje to následující příklad.

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

Bajtová pole vytvořená metodou ToByteArray z kladných hodnot zahrnují tento dodatečný bajt nulové hodnoty. BigInteger Proto může struktura úspěšně zaokrouhlit hodnoty jejich přiřazením a následným obnovením z polí bajtů, jak ukazuje následující příklad.

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

Tento dodatečný bajt nulové hodnoty však může být potřeba přidat k bajtovým polím vytvořeným dynamicky vývojářem nebo vrácené metodami, které převádějí celá čísla bez znaménka na bajtová pole (například BitConverter.GetBytes(UInt16), BitConverter.GetBytes(UInt32)a BitConverter.GetBytes(UInt64)).

Při analýze šestnáctkového řetězce metody BigInteger.Parse(String, NumberStyles) a BigInteger.Parse(String, NumberStyles, IFormatProvider) předpokládají, že pokud je nastaven nejvýznamnější bit prvního bajtu v řetězci, nebo pokud první šestnáctková číslice řetězce představuje nízké čtyři bity hodnoty bajtu, je hodnota reprezentována pomocí dvojkového doplňkového kódu. Například "FF01" i "F01" představují desetinnou hodnotu -255. Aby bylo možné odlišit kladné hodnoty od záporných hodnot, měly by kladné hodnoty obsahovat úvodní nulu. Relevantní přetížení metody ToString, když je předán formátový řetězec "X", přidává úvodní nulu k vrácenému šestnáctkovému řetězci pro kladné hodnoty. To umožňuje obousměrný přenos hodnot BigInteger pomocí metod ToString a Parse, jak ukazuje následující příklad.

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.

Hexadecimální řetězce vytvořené voláním metod ToString jiných integrálních typů nebo přetížení metody ToString, které obsahují parametr toBase, neindikují znaménko hodnoty ani zdrojový datový typ, ze kterého hexadecimální řetězec pochází. Pro vytvoření instance hodnoty BigInteger z takového řetězce je potřeba určitá další logika. Následující příklad poskytuje jednu možnou implementaci.

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.

Konstruktory

Name Description
BigInteger(Byte[])

Inicializuje novou instanci BigInteger struktury pomocí hodnot v bajtovém poli.

BigInteger(Decimal)

Inicializuje novou instanci BigInteger struktury pomocí Decimal hodnoty.

BigInteger(Double)

Inicializuje novou instanci BigInteger struktury pomocí hodnoty s plovoucí desetinnou čárkou s dvojitou přesností.

BigInteger(Int32)

Inicializuje novou instanci BigInteger struktury pomocí 32bitové celočíselné hodnoty.

BigInteger(Int64)

Inicializuje novou instanci BigInteger struktury pomocí 64bitové celočíselné hodnoty.

BigInteger(ReadOnlySpan<Byte>, Boolean, Boolean)

Inicializuje novou instanci BigInteger struktury pomocí hodnot v rozsahu jen pro čtení bajtů a volitelně označuje kódování podepisování a pořadí bajtů endianness.

BigInteger(Single)

Inicializuje novou instanci BigInteger struktury pomocí hodnoty s plovoucí desetinnou čárkou s jednoduchou přesností.

BigInteger(UInt32)

Inicializuje novou instanci BigInteger struktury pomocí 32bitové celočíselné hodnoty bez znaménka.

BigInteger(UInt64)

Inicializuje novou instanci BigInteger struktury s nepodepsanou 64bitovou celočíselnou hodnotou.

Vlastnosti

Name Description
IsEven

Určuje, zda hodnota aktuálního BigInteger objektu je sudé číslo.

IsOne

Určuje, zda je BigIntegerhodnota aktuálního One objektu .

IsPowerOfTwo

Určuje, zda je hodnota aktuálního BigInteger objektu mocnina dvou.

IsZero

Určuje, zda je BigIntegerhodnota aktuálního Zero objektu .

MinusOne

Získá hodnotu, která představuje číslo záporné (-1).

One

Získá hodnotu, která představuje číslo jedna (1).

Sign

Získá číslo, které označuje znaménko (záporné, kladné nebo nula) aktuálního BigInteger objektu.

Zero

Získá hodnotu, která představuje číslo 0 (nula).

Metody

Name Description
Abs(BigInteger)

Získá absolutní hodnotu objektu BigInteger .

Add(BigInteger, BigInteger)

Sečte dvě BigInteger hodnoty a vrátí výsledek.

Clamp(BigInteger, BigInteger, BigInteger)

Uchytá hodnotu na inkluzivní minimální a maximální hodnotu.

Compare(BigInteger, BigInteger)

Porovná dvě BigInteger hodnoty a vrátí celé číslo, které určuje, zda je první hodnota menší, rovna nebo větší než druhá hodnota.

CompareTo(BigInteger)

Porovná tuto instanci s sekundou BigInteger a vrátí celé číslo, které určuje, zda je hodnota této instance menší, rovna nebo větší než hodnota zadaného objektu.

CompareTo(Int64)

Porovná tuto instanci se znaménkem 64bitové celé číslo a vrátí celé číslo, které určuje, zda je hodnota této instance menší, rovna nebo větší než hodnota 64bitového celého čísla se znaménkem.

CompareTo(Object)

Porovná tuto instanci se zadaným objektem a vrátí celé číslo, které určuje, zda je hodnota této instance menší, rovna nebo větší než hodnota zadaného objektu.

CompareTo(UInt64)

Porovná tuto instanci s 64bitovým celé číslo bez znaménka a vrátí celé číslo, které určuje, zda je hodnota této instance menší, rovna nebo větší než hodnota 64bitového celého čísla bez znaménka.

CopySign(BigInteger, BigInteger)

Zkopíruje znaménko hodnoty na znaménko jiné hodnoty.

CreateChecked<TOther>(TOther)

Vytvoří instanci aktuálního typu z hodnoty, která vyvolá výjimku přetečení pro všechny hodnoty, které spadají mimo reprezentovatelný rozsah aktuálního typu.

CreateSaturating<TOther>(TOther)

Vytvoří instanci aktuálního typu z hodnoty, která saturuje všechny hodnoty, které spadají mimo reprezentovatelný rozsah aktuálního typu.

CreateTruncating<TOther>(TOther)

Vytvoří instanci aktuálního typu z hodnoty a zkrátí všechny hodnoty, které spadají mimo reprezentovatelný rozsah aktuálního typu.

Divide(BigInteger, BigInteger)

Vydělí jednu BigInteger hodnotu jinou a vrátí výsledek.

DivRem(BigInteger, BigInteger, BigInteger)

Vydělí jednu BigInteger hodnotu jinou, vrátí výsledek a vrátí zbytek ve výstupním parametru.

DivRem(BigInteger, BigInteger)

Vypočítá podíl a zbytek dvou hodnot.

Equals(BigInteger)

Vrátí hodnotu, která určuje, zda aktuální instance a zadaný BigInteger objekt mají stejnou hodnotu.

Equals(Int64)

Vrátí hodnotu, která určuje, zda aktuální instance a 64bitové celé číslo se znaménkem mají stejnou hodnotu.

Equals(Object)

Vrátí hodnotu, která určuje, zda aktuální instance a zadaný objekt mají stejnou hodnotu.

Equals(UInt64)

Vrátí hodnotu, která určuje, jestli aktuální instance a 64bitové celé číslo bez znaménka mají stejnou hodnotu.

GetBitLength()

Získá počet bitů vyžadovaných pro nejkratší reprezentaci dvou doplňků aktuální instance bez bitu znaménka.

GetByteCount(Boolean)

Získá počet bajtů, které budou výstupem ToByteArray(Boolean, Boolean) a TryWriteBytes(Span<Byte>, Int32, Boolean, Boolean).

GetHashCode()

Vrátí kód hash pro aktuální BigInteger objekt.

GreatestCommonDivisor(BigInteger, BigInteger)

Najde největší společný dělitel dvou BigInteger hodnot.

IsEvenInteger(BigInteger)

Určuje, zda hodnota představuje sudé celočíselné číslo.

IsNegative(BigInteger)

Určuje, zda je hodnota záporná.

IsOddInteger(BigInteger)

Určuje, zda hodnota představuje liché celočíselné číslo.

IsPositive(BigInteger)

Určuje, jestli je hodnota kladná.

IsPow2(BigInteger)

Určuje, zda je hodnota mocnina dvou.

LeadingZeroCount(BigInteger)

Vypočítá počet úvodních nul v hodnotě.

Log(BigInteger, Double)

Vrátí logaritmus zadaného čísla v zadaném základu.

Log(BigInteger)

Vrátí přirozený (základní e) logaritmus zadaného čísla.

Log10(BigInteger)

Vrátí logaritmus zadaného čísla o základu 10.

Log2(BigInteger)

Vypočítá protokol 2 hodnoty.

Max(BigInteger, BigInteger)

Vrátí větší ze dvou BigInteger hodnot.

MaxMagnitude(BigInteger, BigInteger)

Porovná dvě hodnoty s výpočty, které jsou větší.

Min(BigInteger, BigInteger)

Vrátí menší ze dvou BigInteger hodnot.

MinMagnitude(BigInteger, BigInteger)

Porovná dvě hodnoty s výpočetními prostředky, které jsou menší.

ModPow(BigInteger, BigInteger, BigInteger)

Provede dělení modulu na čísle umocněné na mocninu jiného čísla.

Multiply(BigInteger, BigInteger)

Vrátí součin dvou BigInteger hodnot.

Negate(BigInteger)

Neguje zadanou BigInteger hodnotu.

Parse(ReadOnlySpan<Byte>, IFormatProvider)

Představuje libovolné velké celé číslo se signedm.

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

Představuje libovolné velké celé číslo se signedm.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Parsuje rozsah znaků do hodnoty.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Převede reprezentaci čísla obsaženého v zadaném rozsahu znaků jen pro čtení v zadaném stylu na jeho BigInteger ekvivalent.

Parse(String, IFormatProvider)

Převede řetězcovou reprezentaci čísla v zadaném formátu specifickém pro jazykovou verzi na jeho BigInteger ekvivalent.

Parse(String, NumberStyles, IFormatProvider)

Převede řetězcovou reprezentaci čísla v zadaném stylu a formátu specifickém pro jazykovou verzi na jeho BigInteger ekvivalent.

Parse(String, NumberStyles)

Převede řetězcové vyjádření čísla v zadaném stylu na jeho BigInteger ekvivalent.

Parse(String)

Převede řetězcové vyjádření čísla na jeho BigInteger ekvivalent.

PopCount(BigInteger)

Vypočítá počet bitů, které jsou nastavené v hodnotě.

Pow(BigInteger, Int32)

BigInteger Zvýší hodnotu na mocninu zadané hodnoty.

Remainder(BigInteger, BigInteger)

Provede celočíselné dělení na dvě BigInteger hodnoty a vrátí zbytek.

RotateLeft(BigInteger, Int32)

Otočí hodnotu doleva o danou částku.

RotateRight(BigInteger, Int32)

Otočí hodnotu doprava o danou částku.

Subtract(BigInteger, BigInteger)

Odečte jednu BigInteger hodnotu od druhé a vrátí výsledek.

ToByteArray()

BigInteger Převede hodnotu na pole bajtů.

ToByteArray(Boolean, Boolean)

Vrátí hodnotu této BigInteger hodnoty jako bajtové pole s použitím nejmenšího možného počtu bajtů. Pokud je hodnota nula, vrátí pole jednoho bajtu, jehož prvek je 0x00.

ToString()

Převede číselnou hodnotu aktuálního BigInteger objektu na ekvivalentní řetězcové vyjádření.

ToString(IFormatProvider)

Převede číselnou hodnotu aktuálního BigInteger objektu na ekvivalentní řetězcové vyjádření pomocí zadaných informací o formátování specifické pro jazykovou verzi.

ToString(String, IFormatProvider)

Převede číselnou hodnotu aktuálního BigInteger objektu na ekvivalentní řetězcové vyjádření pomocí zadaného formátu a informací o formátu specifickém pro jazykovou verzi.

ToString(String)

Převede číselnou hodnotu aktuálního BigInteger objektu na ekvivalentní řetězcové vyjádření pomocí zadaného formátu.

TrailingZeroCount(BigInteger)

Vypočítá počet koncových nul v hodnotě.

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

Představuje libovolné velké celé číslo se signedm.

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

Formátuje tuto velkou celočíselnou instanci do rozsahu znaků.

TryParse(ReadOnlySpan<Byte>, BigInteger)

Představuje libovolné velké celé číslo se signedm.

TryParse(ReadOnlySpan<Byte>, IFormatProvider, BigInteger)

Představuje libovolné velké celé číslo se signedm.

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

Představuje libovolné velké celé číslo se signedm.

TryParse(ReadOnlySpan<Char>, BigInteger)

Pokusí se převést reprezentaci čísla obsaženého v zadaném rozsahu znaků jen pro čtení na jeho BigInteger ekvivalent a vrátí hodnotu, která označuje, zda převod proběhl úspěšně.

TryParse(ReadOnlySpan<Char>, IFormatProvider, BigInteger)

Pokusí se analyzovat rozsah znaků do hodnoty.

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

Pokusí se převést řetězcovou reprezentaci čísla na BigInteger jeho ekvivalent a vrátí hodnotu, která označuje, zda převod proběhl úspěšně.

TryParse(String, BigInteger)

Pokusí se převést řetězcovou reprezentaci čísla na BigInteger jeho ekvivalent a vrátí hodnotu, která označuje, zda převod proběhl úspěšně.

TryParse(String, IFormatProvider, BigInteger)

Pokusí se analyzovat řetězec do hodnoty.

TryParse(String, NumberStyles, IFormatProvider, BigInteger)

Pokusí se převést řetězcovou reprezentaci čísla v zadaném stylu a formátu specifickém pro jazykovou verzi na jeho BigInteger ekvivalent a vrátí hodnotu, která označuje, zda převod proběhl úspěšně.

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

Zkopíruje hodnotu těchto BigInteger dvou bajtů s minimálním endianem, a to pomocí nejmenšího možného počtu bajtů. Pokud je hodnota nula, vypíše jeden bajt, jehož prvek je 0x00.

Operátory

Name Description
Addition(BigInteger, BigInteger)

Sečte hodnoty dvou zadaných BigInteger objektů.

BitwiseAnd(BigInteger, BigInteger)

Provede bitovou And operaci se dvěma BigInteger hodnotami.

BitwiseOr(BigInteger, BigInteger)

Provede bitovou Or operaci se dvěma BigInteger hodnotami.

Decrement(BigInteger)

BigInteger Sníží hodnotu o 1.

Division(BigInteger, BigInteger)

Vydělí zadanou BigInteger hodnotu jinou zadanou BigInteger hodnotou pomocí celočíselného dělení.

Equality(BigInteger, BigInteger)

Vrátí hodnotu, která určuje, zda jsou hodnoty dvou BigInteger objektů stejné.

Equality(BigInteger, Int64)

Vrátí hodnotu, která určuje, jestli BigInteger je hodnota a dlouhá celočíselná hodnota se znaménkem rovna.

Equality(BigInteger, UInt64)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota a hodnota bez znaménka dlouhé celé číslo rovna.

Equality(Int64, BigInteger)

Vrátí hodnotu, která určuje, zda je znaménkem dlouhá celočíselná hodnota a BigInteger hodnota rovna.

Equality(UInt64, BigInteger)

Vrátí hodnotu, která určuje, zda je neznaměná dlouhá celočíselná hodnota a BigInteger hodnota rovna.

ExclusiveOr(BigInteger, BigInteger)

Provede bitové exkluzivní OrXOr() operace se dvěma BigInteger hodnotami.

Explicit(BFloat16 to BigInteger)

Představuje libovolné velké celé číslo se signedm.

Explicit(BigInteger to BFloat16)

Představuje libovolné velké celé číslo se signedm.

Explicit(BigInteger to Byte)

Definuje explicitní převod objektu BigInteger na nepodepsanou bajtovou hodnotu.

Explicit(BigInteger to Char)

Explicitně převede velké celé číslo na Char hodnotu.

Explicit(BigInteger to Decimal)

Definuje explicitní převod objektu BigIntegerDecimal na hodnotu.

Explicit(BigInteger to Double)

Definuje explicitní převod objektu BigIntegerDouble na hodnotu.

Explicit(BigInteger to Half)

Explicitně převede velké celé číslo na Half hodnotu.

Explicit(BigInteger to Int128)

Explicitně převede velké celé číslo na Int128 hodnotu.

Explicit(BigInteger to Int16)

Definuje explicitní převod objektu BigInteger na 16bitovou celočíselnou hodnotu.

Explicit(BigInteger to Int32)

Definuje explicitní převod objektu BigInteger na 32bitovou celočíselnou hodnotu.

Explicit(BigInteger to Int64)

Definuje explicitní převod objektu BigInteger na 64bitovou celočíselnou hodnotu.

Explicit(BigInteger to IntPtr)

Explicitně převede velké celé číslo na IntPtr hodnotu.

Explicit(BigInteger to SByte)

Definuje explicitní převod objektu BigInteger na podepsanou 8bitovou hodnotu.

Toto rozhraní API neodpovídá specifikaci CLS. Vyhovující alternativou je Int16.

Explicit(BigInteger to Single)

Definuje explicitní převod objektu BigInteger na hodnotu s plovoucí desetinnou čárkou s jednoduchou přesností.

Explicit(BigInteger to UInt128)

Explicitně převede velké celé číslo na UInt128 hodnotu.

Explicit(BigInteger to UInt16)

Definuje explicitní převod objektu BigInteger na 16bitovou celočíselnou hodnotu bez znaménka.

Toto rozhraní API neodpovídá specifikaci CLS. Vyhovující alternativou je Int32.

Explicit(BigInteger to UInt32)

Definuje explicitní převod objektu BigInteger na 32bitovou celočíselnou hodnotu bez znaménka.

Toto rozhraní API neodpovídá specifikaci CLS. Vyhovující alternativou je Int64.

Explicit(BigInteger to UInt64)

Definuje explicitní převod objektu BigInteger na 64bitovou celočíselnou hodnotu bez znaménka.

Toto rozhraní API neodpovídá specifikaci CLS. Vyhovující alternativou je Double.

Explicit(BigInteger to UIntPtr)

Explicitně převede velké celé číslo na UIntPtr hodnotu.

Explicit(Complex to BigInteger)

Explicitně převede Complex hodnotu na velké celé číslo.

Explicit(Decimal to BigInteger)

Definuje explicitní převod objektu DecimalBigInteger na hodnotu.

Explicit(Double to BigInteger)

Definuje explicitní převod Double hodnoty na BigInteger hodnotu.

Explicit(Half to BigInteger)

Explicitně převede Half hodnotu na velké celé číslo.

Explicit(Single to BigInteger)

Definuje explicitní převod Single hodnoty na BigInteger hodnotu.

GreaterThan(BigInteger, BigInteger)

Vrátí hodnotu, která určuje, jestli BigInteger je hodnota větší než jiná BigInteger hodnota.

GreaterThan(BigInteger, Int64)

Vrátí hodnotu, která určuje, zda BigInteger je větší než 64bitová celočíselná hodnota se znaménkem.

GreaterThan(BigInteger, UInt64)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota větší než 64bitové celé číslo bez znaménka.

GreaterThan(Int64, BigInteger)

Vrátí hodnotu, která určuje, jestli je 64bitové celé číslo se znaménkem větší než BigInteger hodnota.

GreaterThan(UInt64, BigInteger)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota větší než 64bitové celé číslo bez znaménka.

GreaterThanOrEqual(BigInteger, BigInteger)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota větší nebo rovna jiné BigInteger hodnotě.

GreaterThanOrEqual(BigInteger, Int64)

Vrátí hodnotu, která určuje, jestli BigInteger je hodnota větší nebo rovna 64bitové celočíselné hodnotě se znaménkem.

GreaterThanOrEqual(BigInteger, UInt64)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota větší nebo rovna 64bitové celočíselné hodnotě bez znaménka.

GreaterThanOrEqual(Int64, BigInteger)

Vrátí hodnotu, která určuje, jestli je 64bitové celé číslo se znaménkem větší nebo rovno hodnotě BigInteger .

GreaterThanOrEqual(UInt64, BigInteger)

Vrátí hodnotu, která určuje, zda je 64bitové celé číslo bez znaménka větší nebo rovno hodnotě BigInteger .

Implicit(Byte to BigInteger)

Definuje implicitní převod nepodepsaného bajtu BigInteger na hodnotu.

Implicit(Char to BigInteger)

Implicitně převede Char hodnotu na velké celé číslo.

Implicit(Int128 to BigInteger)

Implicitně převede Int128 hodnotu na velké celé číslo.

Implicit(Int16 to BigInteger)

Definuje implicitní převod 16bitového 16bitového celého čísla na BigInteger hodnotu.

Implicit(Int32 to BigInteger)

Definuje implicitní převod 32bitového 32bitového celého čísla na BigInteger hodnotu.

Implicit(Int64 to BigInteger)

Definuje implicitní převod 64bitového 64bitového celého čísla na BigInteger hodnotu.

Implicit(IntPtr to BigInteger)

Implicitně převede IntPtr hodnotu na velké celé číslo.

Implicit(SByte to BigInteger)

Definuje implicitní převod 8bitového signtegeru BigInteger na hodnotu.

Toto rozhraní API neodpovídá specifikaci CLS. Vyhovující alternativou je BigInteger(Int32).

Implicit(UInt128 to BigInteger)

Implicitně převede UInt128 hodnotu na velké celé číslo.

Implicit(UInt16 to BigInteger)

Definuje implicitní převod 16bitového celočíselného čísla bez znaménka na BigInteger hodnotu.

Toto rozhraní API neodpovídá specifikaci CLS. Vyhovující alternativou je Implicit(Int32 to BigInteger).

Implicit(UInt32 to BigInteger)

Definuje implicitní převod 32bitového celého čísla bez znaménka na BigInteger hodnotu.

Toto rozhraní API neodpovídá specifikaci CLS. Vyhovující alternativou je Implicit(Int64 to BigInteger).

Implicit(UInt64 to BigInteger)

Definuje implicitní převod 64bitového celého čísla bez znaménka na BigInteger hodnotu.

Toto rozhraní API neodpovídá specifikaci CLS. Vyhovující alternativou je Double.

Implicit(UIntPtr to BigInteger)

Implicitně převede UIntPtr hodnotu na velké celé číslo.

Increment(BigInteger)

Zvýší BigInteger hodnotu o 1.

Inequality(BigInteger, BigInteger)

Vrátí hodnotu, která určuje, zda dva BigInteger objekty mají různé hodnoty.

Inequality(BigInteger, Int64)

Vrátí hodnotu, která určuje, zda BigInteger hodnota a 64bitové celé číslo se znaménkem nejsou rovny.

Inequality(BigInteger, UInt64)

Vrátí hodnotu, která určuje, zda BigInteger hodnota a 64bitové celé číslo bez znaménka nejsou rovny.

Inequality(Int64, BigInteger)

Vrátí hodnotu, která určuje, jestli se 64bitové celé číslo se znaménkem a BigInteger hodnota nerovná.

Inequality(UInt64, BigInteger)

Vrátí hodnotu, která určuje, jestli se 64bitové celé číslo bez znaménka a BigInteger hodnota nerovná.

LeftShift(BigInteger, Int32)

Posune BigInteger hodnotu o zadaný počet bitů doleva.

LessThan(BigInteger, BigInteger)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota menší než jiná BigInteger hodnota.

LessThan(BigInteger, Int64)

Vrátí hodnotu, která určuje, jestli BigInteger je hodnota menší než 64bitové celé číslo se znaménkem.

LessThan(BigInteger, UInt64)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota menší než 64bitové celé číslo bez znaménka.

LessThan(Int64, BigInteger)

Vrátí hodnotu, která určuje, jestli je 64bitové celé číslo se znaménkem menší než BigInteger hodnota.

LessThan(UInt64, BigInteger)

Vrátí hodnotu, která určuje, zda je 64bitové celé číslo bez znaménka menší než BigInteger hodnota.

LessThanOrEqual(BigInteger, BigInteger)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota menší nebo rovna jiné BigInteger hodnotě.

LessThanOrEqual(BigInteger, Int64)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota menší nebo rovna 64bitovému znaménku.

LessThanOrEqual(BigInteger, UInt64)

Vrátí hodnotu, která určuje, zda BigInteger je hodnota menší nebo rovna 64bitovému celočíselnému znaménku.

LessThanOrEqual(Int64, BigInteger)

Vrátí hodnotu, která určuje, jestli je 64bitové celé číslo se znaménkem menší nebo rovno hodnotě BigInteger .

LessThanOrEqual(UInt64, BigInteger)

Vrátí hodnotu, která určuje, zda je 64bitové celé číslo bez znaménka menší nebo rovno hodnotě BigInteger .

Modulus(BigInteger, BigInteger)

Vrátí zbytek, který je výsledkem dělení se dvěma zadanými BigInteger hodnotami.

Multiply(BigInteger, BigInteger)

Vynásobí dvě zadané BigInteger hodnoty.

OnesComplement(BigInteger)

Vrátí bitový doplněk BigInteger hodnoty.

RightShift(BigInteger, Int32)

Posune BigInteger hodnotu o zadaný počet bitů doprava.

Subtraction(BigInteger, BigInteger)

Odečte BigInteger hodnotu od jiné BigInteger hodnoty.

UnaryNegation(BigInteger)

Neguje zadanou hodnotu BigInteger.

UnaryPlus(BigInteger)

Vrátí hodnotu operandu BigInteger . (Znaménko operandu se nezmění.)

UnsignedRightShift(BigInteger, Int32)

Posune hodnotu doprava o danou částku.

Explicitní implementace rozhraní

Name Description
IAdditiveIdentity<BigInteger,BigInteger>.AdditiveIdentity

Získá přídatnou identitu aktuálního typu.

IBinaryInteger<BigInteger>.GetByteCount()

Získá počet bajtů, které budou zapsány jako součást TryWriteLittleEndian(Span<Byte>, Int32).

IBinaryInteger<BigInteger>.GetShortestBitLength()

Získá délku v bitech nejkratšího dvou doplňku reprezentace aktuální hodnoty.

IBinaryInteger<BigInteger>.Log10(BigInteger)

Představuje libovolné velké celé číslo se signedm.

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

Představuje libovolné velké celé číslo se signedm.

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

Představuje libovolné velké celé číslo se signedm.

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

Pokusí se na daný rozsah napsat aktuální hodnotu ve formátu big-endian.

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

Pokusí se na daný rozsah napsat aktuální hodnotu v malém endian formátu.

IBinaryNumber<BigInteger>.AllBitsSet

Získá instanci binárního typu, ve které jsou nastaveny všechny bity.

IComparable.CompareTo(Object)

Porovná tuto instanci se zadaným objektem a vrátí celé číslo, které určuje, zda je hodnota této instance menší, rovna nebo větší než hodnota zadaného objektu.

IMultiplicativeIdentity<BigInteger,BigInteger>.MultiplicativeIdentity

Získá multiplikativní identitu aktuálního typu.

INumber<BigInteger>.MaxNumber(BigInteger, BigInteger)

Porovná dvě hodnoty k výpočtu, který je větší a vrátí druhou hodnotu, pokud je NaNjedním vstupem .

INumber<BigInteger>.MinNumber(BigInteger, BigInteger)

Porovná dvě hodnoty k výpočtu, který je menší a vrátí druhou hodnotu, pokud je NaNjedním vstupem .

INumber<BigInteger>.Sign(BigInteger)

Vypočítá znaménko hodnoty.

INumberBase<BigInteger>.IsCanonical(BigInteger)

Určuje, zda je hodnota v kanonickém vyjádření.

INumberBase<BigInteger>.IsComplexNumber(BigInteger)

Určuje, zda hodnota představuje komplexní číslo.

INumberBase<BigInteger>.IsFinite(BigInteger)

Určuje, zda je hodnota konečná.

INumberBase<BigInteger>.IsImaginaryNumber(BigInteger)

Určuje, jestli hodnota představuje čisté imaginární číslo.

INumberBase<BigInteger>.IsInfinity(BigInteger)

Určuje, zda je hodnota nekonečná.

INumberBase<BigInteger>.IsInteger(BigInteger)

Určuje, zda hodnota představuje celočíselné číslo.

INumberBase<BigInteger>.IsNaN(BigInteger)

Určuje, jestli je hodnota NaN.

INumberBase<BigInteger>.IsNegativeInfinity(BigInteger)

Určuje, zda je hodnota záporná nekonečno.

INumberBase<BigInteger>.IsNormal(BigInteger)

Určuje, zda je hodnota normální.

INumberBase<BigInteger>.IsPositiveInfinity(BigInteger)

Určuje, jestli je hodnota kladná nekonečno.

INumberBase<BigInteger>.IsRealNumber(BigInteger)

Určuje, zda hodnota představuje reálné číslo.

INumberBase<BigInteger>.IsSubnormal(BigInteger)

Určuje, jestli je hodnota podnormální.

INumberBase<BigInteger>.IsZero(BigInteger)

Určuje, jestli je hodnota nula.

INumberBase<BigInteger>.MaxMagnitudeNumber(BigInteger, BigInteger)

Porovná dvě hodnoty k výpočtu, které mají větší velikost a vrátí druhou hodnotu, pokud je NaNjedním vstupem .

INumberBase<BigInteger>.MinMagnitudeNumber(BigInteger, BigInteger)

Porovná dvě hodnoty k výpočtu, které mají menší velikost a vrátí druhou hodnotu, pokud je NaNjeden vstup .

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

Vypočítá odhad (left * right) + . addend

INumberBase<BigInteger>.Radix

Získá radix (základ číselné soustavy) pro typ.

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

Představuje libovolné velké celé číslo se signedm.

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

Představuje libovolné velké celé číslo se signedm.

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

Představuje libovolné velké celé číslo se signedm.

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

Pokusí se převést instanci aktuálního typu na jiný typ a vyvolá výjimku přetečení pro všechny hodnoty, které spadají mimo reprezentovatelný rozsah aktuálního typu.

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

Pokusí se převést instanci aktuálního typu na jiný typ a nasytí všechny hodnoty, které spadají mimo reprezentovatelný rozsah aktuálního typu.

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

Pokusí se převést instanci aktuálního typu na jiný typ a zkrátí všechny hodnoty, které spadají mimo reprezentovatelný rozsah aktuálního typu.

ISignedNumber<BigInteger>.NegativeOne

Získá hodnotu -1 pro typ.

Platí pro