使用MVC 5创建一个新的Razor View项目。
添加对System.Numerics的引用
在我的控制器中,我可以像这样使用BigInteger
using System.Numerics;
var bi = new BigInteger(100);
但在我看来,我不能这样做:
@using System.Numerics
@{
var bi = new BigInteger(100);
}
它继续抱怨没有引用System.Numerics。
请在您的视图中使用此命名空间。这在我的视图中有用。可能这会对您有所帮助。
@using Org.BouncyCastle.Math;
@{
BigInteger bi = new BigInteger("100");
}