BigInteger.Modulus(BigInteger, BigInteger) 运算符

定义

``````public:
static System::Numerics::BigInteger operator %(System::Numerics::BigInteger dividend, System::Numerics::BigInteger divisor);``````
``public static System.Numerics.BigInteger operator % (System.Numerics.BigInteger dividend, System.Numerics.BigInteger divisor);``
``static member ( % ) : System.Numerics.BigInteger * System.Numerics.BigInteger -> System.Numerics.BigInteger``
``Public Shared Operator Mod (dividend As BigInteger, divisor As BigInteger) As BigInteger``

dividend
BigInteger

divisor
BigInteger

BigInteger

例外

`divisor` 是 0（零）。`divisor` is 0 (zero).

注解

Modulus 方法定义 BigInteger 值的取模运算符的操作。The Modulus method defines the operation of the modulus operator for BigInteger values. 它可以实现如下所示的代码：It enables code such as the following:

``````BigInteger num1 = 100045632194;
BigInteger num2 = 90329434;
BigInteger remainder = num1 % num2;
Console.WriteLine(remainder);           // Displays 50948756
``````
``````Dim num1 As BigInteger = 100045632194
Dim num2 As BigInteger = 90329434
Dim remainder As BigInteger = num1 Mod num2
Console.WriteLine(remainder)                 ' Displays  50948756
``````