In MS C#, the following constructor works:
Int64 a = 123;
BigInteger bi = new BigInteger(a);
This does not work in Mono. The compile complains that it can’t convert from long to BigInteger (CS1502, CS1503).
Is there anyway to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See the BigInteger constructors on Mono, http://docs.go-mono.com/?link=T%3aMono.Math.BigInteger%2fC
There is no constructor accepting
long (which is the same as Int64)Try
BigInteger bi = new BigInteger((ulong)a);or
BigInteger bi = new BigInteger((uint)a);