To check some bank account numbers I want to do a modulo 97 on an account number. But a lot of account number is to big to enter in a UInt64.
How can I do an opperation on a 24 digits integer ?
Thanks,
Sample code (it can't convert) :
(Convert.ToUInt64("756842356987456214536254") % 97 == 1);
One way would be to use System.Numeric
's BigInteger
:
BigInteger bi = BigInteger.Parse("756842356987456214536254");
Thanks,
It's work.
Org.BouncyCastle.Math.BigInteger bi = new BigInteger("756842356987456214536254");
(Convert.ToInt32(bi.Mod(new BigInteger("97")).ToString()) == 1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With