BigInteger::Divide Method (BigInteger, BigInteger)


Divides one BigInteger value by another and returns the result.

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

static BigInteger Divide(
	BigInteger dividend,
	BigInteger divisor


Type: System.Numerics::BigInteger

The value to be divided.

Type: System.Numerics::BigInteger

The value to divide by.

Return Value

Type: System.Numerics::BigInteger

The quotient of the division.

Exception Condition

divisor is 0 (zero).

The Divide method performs integer division; any remainder that results from the division is discarded. To perform integer division while preserving the remainder, call the DivRem method. To retrieve only the remainder, call the Remainder method.

The Divide method can be used by languages that do not support operator overloading. Its behavior is identical to division using the division operator.

The following example creates an array of BigInteger values. It then uses each element as the quotient in a division operation that uses the Divide method, the division operator (/), and the DivRem method.

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
Available since 4.0
Windows Phone
Available since 8.1
Return to top