BigInteger: DivRem

DivRem

Divides this value by the value, returning the quotient and remainding.



 Public Function DivRem(
	  ByVal Divisor As BigInteger,
	  ByRef Remainder As BigInteger ) As BigInteger

Parameters

Divisor
[ByVal] BigInteger. A numeric representation of the value to divide this instance by.
Remainder
[ByRef] BigInteger. A reference to the variable to receive the remainder as a result of the division.

Return Values

BigInteger -  A new instance of BigInteger containing the quotient value.

Remarks

This method accepts a BigInteger, one of VBs numeric values or a string to be parsed.

 Dim b As BigInteger
 Dim r As BigInteger
 Dim q As BigInteger
 Set b = BInt(100)
 Set q = b.DivRem(BInt(40), r)
 Debug.Print q.ToString
 Debug.Print r.ToString

 ' This outputs the following:
 2
 20
 

See Also

Project CorLib Overview

Class BigInteger Overview