Thursday, August 28, 2014

BigInteger - Cannot Instantiate Large Number - Approx 150+ Digits

Check this code, do not forget to add reference to System.Numerics to your project:



using System;
using System.Numerics;

namespace BigNumTest
{
class Program
{
static void Main(string[] args)
{
string stringBigNum = new string('1', 160);
BigInteger bigNum = BigInteger.Parse(stringBigNum);
}
}
}


No comments:

Post a Comment