Friday, April 8, 2022

[SOLVED] How to use the BigInteger class in MonoDevelop?

Issue

I am using MonoDevelop in Linux Mint.

My problem is that I cannot find a the reference "System.Numerics", which otherwise I can easily find in VisualStudio when I use Windows.

I want particularly to use the BigInteger for larger values. The closest thing I could find was this library: https://biginteger.codeplex.com/; which did not really work for me since I was not able to link it.

(This was the only thing I could find on here that was similar to my question, though did not work for me: Mono missing System.Numerics.BigInteger.Parse(string,IFormatProvider) . Any other proposal that would allow me to use numbers bigger than 20 digits is welcome.)


Solution

Add a reference to System.Numerics for your project:

enter image description here

Using:

using System.Numerics

Usage:

var bigInt = new BigInteger();


Answered By - SushiHangover
Answer Checked By - Dawn Plyler (WPSolving Volunteer)