BigInteger::Divide Method
Divides one BigInteger value by another and returns the result.
Assembly: System.Numerics (in System.Numerics.dll)
Parameters
- dividend
- Type: System.Numerics::BigInteger
The value to be divided.
- divisor
- Type: System.Numerics::BigInteger
The value to divide by.
| Exception | Condition |
|---|---|
| DivideByZeroException | 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.
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.