This documentation is archived and is not being maintained.

BigInteger::Remainder Method

Performs integer division on two BigInteger values and returns the remainder.

Namespace:  System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

public:
static BigInteger Remainder(
	BigInteger dividend, 
	BigInteger divisor
)

Parameters

dividend
Type: System.Numerics::BigInteger
The value to be divided.
divisor
Type: System.Numerics::BigInteger
The value to divide by.

Return Value

Type: System.Numerics::BigInteger
The remainder after dividing dividend by divisor.

ExceptionCondition
DivideByZeroException

divisor is 0 (zero).

The sign of the remainder is the sign of the dividend parameter.

The Remainder method is implemented for languages that do not support custom operators. Its behavior is identical to division using the modulus operator.

If necessary, the method automatically performs implicit conversion of other integral types to BigInteger objects before it performs the modulus operation.

The following example compares the remainder from the DivRem method with the remainder returned by the Remainder method to establish that the two methods calculate identical remainders.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: