如何使用的BigInteger在VS 2010中如何使用、BigInteger、VS

由网友(少年不再年少)分享简介:我一直在尝试使用的BigInteger类型,即所谓的新的.NET Framework 4.0。我似乎不能够尝试通过使用System.Numerics引用它时,得到它,并得到一个错误。知不知道我做错了吗?很抱歉,如果这是一个愚蠢的问题... 解决方案 添加引用到 System.Numerics 的组装到项目中。一个。在...

我一直在尝试使用的BigInteger类型,即所谓的新的.NET Framework 4.0。

我似乎不能够尝试通过使用System.Numerics引用它时,得到它,并得到一个错误。

知不知道我做错了吗?很抱歉,如果这是一个愚蠢的问题...

解决方案

添加引用到 System.Numerics 的组装到项目中。

一个。在Solution Explorer中,用鼠标右键单击该项目节点,并点击添加引用

乙。在添加引用对话框,请选择 .NET 标签。

℃。选择 System.Numerics ,然后点击确定

添加使用指令一个 进口的 System.Numerics 命名空间:

 使用System.Numerics;
 
BigInteger类

使用的BigInteger结构:

 变种I =新的BigInteger(934157136952);
 

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...

解决方案

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);

阅读全文

相关推荐

最新文章