当我把这一行放在文件的顶部时:
using System.Numerics;我得到以下错误:
Error CS0234: The type or namespace name 'Numerics' does not exist in the namespace 'System' (are you missing an assembly reference?) (CS0234) (CSharpTests)
我文件顶部的其他using指令(如using System; )工作得很好。
我在Ubuntu18.0464位上使用Mono5.12.0.301和MonoDevelop 7.5 (build 1255)。
我最初的想法之一是,框架版本被设置为一个足够老到没有System.Numerics的版本。在Options -> Build -> General中,我的框架版本是默认的4.5,将其更改为4.7.1的最新版本并不能使代码工作:

This answer发现问题在于一个过时的框架版本,但是很明显,我有一个足够新的框架版本,对吗?
编辑:好的,对于SushiHangover的回答,我可以使用System.Numerics,但实际上我正在尝试使用System.Numerics.Vectors,我在参考资料中包括了这一点:

但是,当我使用using System.Numerics.Vectors;时,我会得到以下错误:
Error CS0234: The type or namespace name 'Vectors' does not exist in the namespace 'System.Numerics' (are you missing an assembly reference?) (CS0234) (CSharpTests)
发布于 2018-11-22 03:16:22
您需要添加对该程序集的手动引用(以及您需要使用的框架中的任何其他元素,默认情况下,"System“包括在内)。
双击解决方案资源管理器中的项目“引用”:

https://stackoverflow.com/questions/53423256
复制相似问题