Search code examples
c#xamarinbigintegerxamarin-studio

Unable to use System.Numeric in Xamarin studio c#


I am writing a console project which requires some very large numbers above the limit of all classes in c#. I have read of a biginteger class which can support this. Despite this my c# compiler does not recognise the use of System.Numeric which is required to use the biginteger class. I am aware of and able to implement a work around using arrays to store the digits but this would be messier and I was wondering if there was an easier way to use this class somehow.


Solution

  • Add a reference to System.Numerics in your console project:

    enter image description here

    Then include:

    using System.Numerics;
    

    Usage:

    var bInt = new BigInteger();
    

    How do I get to this window?

    To access the project's references, double click on the "References" item within your Solution/Project sub-tree.

    enter image description here

    Ref: