How to use BigInteger in VS 2010

前端 未结 4 1795
生来不讨喜
生来不讨喜 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: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);
      

提交回复
热议问题