Thursday, August 28, 2014

BigInteger - Cannot Instantiate Large Number - Approx 150+ Digits

Hi,


I have searched the forums, but cannot locate the answer to my question, and the samples and examples do not cover my enquiry.


I have to create three (3) constants which are 150+ digits (decimal) long - but i cannot seem to create these.


The IDE VS2013 Express indicates that the integer is too large.


I have attempted to use the BigInteger.Parse method - but the Parse method does not seem to be available despite my "using System.Numerics" with this library selected in the project as an addition.


The creation of a BigInteger seems only to accept known types such a ulong, etc. in the constructor.


I have not attempted the array of bytes method - since not sure how to convert the 150+ number in to an array.


Since the Parse method is not selectable when i attempt to instantiate - i can only assume there is another error or project setting i am not implementing.


Also - i am rusty on C# too - so somethings may be obvious.


Regards,


Richard.


No comments:

Post a Comment