
Question:
I have been trying to use the BigInteger type, that is supposedly new in .NET Framework 4.0.
I don't seem to be able to get to it, and get an error when trying to reference it via Using System.Numerics.
Any idea what I'm doing wrong? Sorry if this is a stupid question...
Answer1:<ol><li>
<a href="http://msdn.microsoft.com/en-us/library/wkze6zky(v=VS.100).aspx" rel="nofollow">Add a reference</a> to the <em>System.Numerics</em> assembly to your project.
a. In Solution Explorer, right-click the project node and click <strong>Add Reference</strong>.
b. In the <strong>Add Reference</strong> dialog box, select the <strong>.NET</strong> tab.
c. Select <strong>System.Numerics</strong>, and then click <strong>OK</strong>.
</li> <li>Add a <a href="http://msdn.microsoft.com/en-us/library/sf0df423.aspx" rel="nofollow">using directive</a> importing the <em>System.Numerics</em> namespace:
using System.Numerics;
</li>
<li>Use the <a href="http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx" rel="nofollow">BigInteger structure</a>:
var i = new BigInteger(934157136952);
</li>
</ol>Answer2:Did you add a reference to System.Numerics?
<blockquote>Right click on References -> Add Reference -> .NET tab -> System.Numerics -> OK
</blockquote> Answer3:Add a Reference to System.Numerics assembly.
Add using System.Numerics;
statement
Have you added a project reference (Project... Add Reference...) to System.Numerics?