How to use BigInteger in VS 2010

纵然是瞬间 提交于 2019-12-01 17:02:47
  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);
    

Did you add a reference to System.Numerics?

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

Add a Reference to System.Numerics assembly.

Add using System.Numerics; statement

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!