我一直在尝试使用BigInteger类型,这是.NET Framework 4.0中新推出的。
但是我好像无法使用它,在尝试通过Using System.Numerics引用它时出现错误。
请问我做错了什么?如果这是一个愚蠢的问题,请原谅...
我一直在尝试使用BigInteger类型,这是.NET Framework 4.0中新推出的。
但是我好像无法使用它,在尝试通过Using System.Numerics引用它时出现错误。
请问我做错了什么?如果这是一个愚蠢的问题,请原谅...
Add a reference to the System.Numerics assembly to your project.
a. In Solution Explorer, right-click the project node and click Add Reference.
b. In the Add Reference dialog box, select the .NET tab.
c. Select System.Numerics, and then click OK.
Add a using directive importing the System.Numerics namespace:
using System.Numerics;
Use the BigInteger structure:
var i = new BigInteger(934157136952);
你是否已经添加了对System.Numerics的引用?
右键点击“引用” -> 添加引用 -> .NET选项卡 -> System.Numerics -> 确定
添加对 System.Numerics 程序集的引用。
添加 using System.Numerics;
语句。