Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BigInteger::Remainder Method (BigInteger, BigInteger)

 

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.

Exception Condition
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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft