How to use BigInteger in VS 2010

前端 未结 4 1793
生来不讨喜
生来不讨喜 2021-01-18 10:03

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 r

相关标签:
4条回答
  • 2021-01-18 10:10

    Did you add a reference to System.Numerics?

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

    0 讨论(0)
  • 2021-01-18 10:22

    Add a Reference to System.Numerics assembly.

    Add using System.Numerics; statement

    0 讨论(0)
  • 2021-01-18 10:28
    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);
      
    0 讨论(0)
  • 2021-01-18 10:30

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

    0 讨论(0)
提交回复
热议问题