-2

I need to be able to use BigInteger and Numerics but I cannot find the using System.Numerics reference in the .NET reference list.

Question: Where is the System.Numerics reference located?

(I know how to get to the area were you can add in reference)

Code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Numerics;

namespace ConsoleApplication1
{
    class Program
    {
       static void Main(string[] args)
        {
            BigInteger b1 = new BigInteger();
            Complex c1   = new Complex(0, 1);

            Console.WriteLine(b1);
            Console.WriteLine(c1);
            Console.ReadKey();
        }
    }
}

Actually it looked like I was not targeting the .NET 3.0 framework.

Doug Hauf
  • 3,025
  • 8
  • 46
  • 70

4 Answers4

3

They're in alphabetical order...

enter image description here

Make sure you are targeting .NET 4.0 or above, note.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
1

In Visual Studio 2010, try this:

in your project,

  1. right click in Add new reference,

  2. Select .NET

  3. AND found this reference

tnw
  • 13,521
  • 15
  • 70
  • 111
Enrique YC
  • 86
  • 6
1

So long as you know a particular member of the namespace, MSDN actually does a decent job of telling you. According to this page on BigInteger: Assembly: System.Numerics (in System.Numerics.dll)

Matt Klinker
  • 773
  • 5
  • 18
  • This doesn't answer the question, OP already knows that assembly is necessary. – tnw Apr 23 '14 at 20:56
  • The question was stated as to where is the namespace, which does not have to be the same as the assembly. Perhaps I misread – Matt Klinker Apr 23 '14 at 20:58
1

You have to add in the using System.Numberics to your project and then it should compile and run.

  1. Right click on Reference (Select Add Reference)
  2. .NET select
  3. Scroll down and select System.Numeric

Note: They say they are in alphabetical order and they sort of but I also have FSharp.Core for example after the M's and so forth. So it is sort of by alphabet but not completely either.

enter image description here Make sure you are targeting the .NET 4.0 system. I am somewhat new to Visual Studio but I do not think that these were available in other versions. i don't use these all that much.