如何在 VS 2010 中使用 BigInteger

发布于 2024-10-04 02:53:12 字数 152 浏览 0 评论 0原文

我一直在尝试使用 BigInteger 类型,这应该是 .NET Framework 4.0 中的新类型。

我似乎无法访问它,并且在尝试通过使用 System.Numerics 引用它时出现错误。

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

芯好空 2024-10-11 02:53:12
  1. 添加引用 System.Numerics 程序集到您的项目中。

    a.在解决方案资源管理器中,右键单击项目节点,然后单击添加引用

    b.在添加引用对话框中,选择.NET选项卡。

    c.选择System.Numerics,然后单击确定

  2. 添加导入 System.Numerics 的 using 指令 命名空间:

    使用 System.Numerics;
    
  3. 使用 BigInteger结构

    var i = new BigInteger(934157136952);
    
  1. 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.

  2. Add a using directive importing the System.Numerics namespace:

    using System.Numerics;
    
  3. Use the BigInteger structure:

    var i = new BigInteger(934157136952);
    
落叶缤纷 2024-10-11 02:53:12

您是否添加了对 System.Numerics 的引用?

右键单击参考文献 ->添加参考-> .NET 选项卡 ->系统.数值 ->好的

Did you add a reference to System.Numerics?

Right click on References -> Add Reference -> .NET tab -> System.Numerics -> OK

乞讨 2024-10-11 02:53:12

添加对 System.Numerics 程序集的引用。

添加 using System.Numerics; 语句

Add a Reference to System.Numerics assembly.

Add using System.Numerics; statement

起风了 2024-10-11 02:53:12

您是否已将项目引用(项目...添加引用...)添加到 System.Numerics 中?

Have you added a project reference (Project... Add Reference...) to System.Numerics?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文