C# 如何添加对 System.Numerics.dll 的引用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9824479/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-09 10:47:15  来源:igfitidea点击:

How to add a reference to System.Numerics.dll

c#.net-assemblysystem.numerics

提问by 55651909-089b-4e04-9408-47c5bf

I want to use the BigInteger class from the System.Numerics but if i want to write

我想使用 System.Numerics 中的 BigInteger 类,但如果我想写

using System.Numerics;

Numericsis not found. I searched the web, and I found that I have to add a reference to System.Numerics.dll, but how can I do that?

Numerics没有找到。我在网上搜索,我发现我必须添加对 的引用System.Numerics.dll,但是我该怎么做呢?

采纳答案by Dave Bish

http://msdn.microsoft.com/en-us/library/7314433t(v=vs.80).aspx

http://msdn.microsoft.com/en-us/library/7314433t(v=vs.80).aspx

From MSDN:

来自 MSDN:

  1. In Solution Explorer, select the project.
  2. On the Project menu, choose Add Reference.
  3. The Add Reference dialog box opens.
  4. Select the tab indicating the type of component you want to reference.
  5. In the top pane, select the component you want to reference, and then click the Select button. Press CTRL while clicking to select multiple components.
  1. 在解决方案资源管理器中,选择项目。
  2. 在项目菜单上,选择添加引用。
  3. 添加引用对话框打开。
  4. 选择指示要引用的组件类型的选项卡。
  5. 在顶部窗格中,选择要引用的组件,然后单击“选择”按钮。单击以选择多个组件的同时按下 CTRL。

回答by Brian

Right click on "References" in the solution explorer and click on "Add Reference" as shown below in the image.

右键单击解决方案资源管理器中的“引用”,然后单击“添加引用”,如下图所示。

enter image description here

在此处输入图片说明

回答by MilkyWayJoe

in Visual Studio, go to Solition Exporer, expand your project, right click in a folder called "References" and click "Add References", browse the references (assemblies) until you find the one you want. If you're using VS 2010, you can simply type "system.numerics" on the search up top. Then just select the reference and click Add, then Close.

在 Visual Studio 中,转到 Solition Exporer,展开您的项目,右键单击名为“References”的文件夹,然后单击“添加引用”,浏览引用(程序集),直到找到所需的引用。如果您使用的是 VS 2010,则只需在顶部搜索中输入“system.numerics”即可。然后只需选择引用并单击添加,然后单击关闭。

回答by gprasant

If you are using .NET 4.0, you can right click in References -> add reference -> In the .NET tab, look for System.Numerics.dll

如果您使用的是 .NET 4.0,您可以右键单击 References -> add reference -> 在 .NET 选项卡中,查找 System.Numerics.dll

enter image description here

在此处输入图片说明

回答by Radislav

Right click the Referencefolder in your solution and choose Add Reference. Then go to <systemDrive>:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089(That's what it is for me; your path might be different.)

右键单击Reference解决方案中的文件夹并选择Add Reference。然后转到<systemDrive>:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089(这对我来说就是这样;你的道路可能会有所不同。)