kellyethridge / VBCorLib

The VBCorLib framework brings many of the powerful .NET classes to VB6.
http://www.kellyethridge.com/vbcorlib/
MIT License
112 stars 28 forks source link

Consider changing BigInteger behavior to support all numeric types in math method signatures #82

Open kellyethridge opened 3 years ago

kellyethridge commented 3 years ago

Right now BigInteger and BigIntegerStatic only accept BigInteger type in the math method calls. Consider changing the signatures to Variant and converting to BigInteger in the method to allow support for other numeric types.

This currently results in a "Type Mismatch" error. It would be useful to allow such method calls.

Set Answer = BigInteger.Add(Int64.MaxValue, &h7FFFFFFF)

To achieve this now we need to use the CBigInt conversion method which can become unwieldy.

Set Answer = BigInteger.Add(CBigInt(Int64.MaxValue), CBigInt(&h7FFFFFFF))