MVC视图不能引用System.Numerics

问题描述 投票:0回答:1

使用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。

asp.net-mvc biginteger
1个回答
-1
投票

请在您的视图中使用此命名空间。这在我的视图中有用。可能这会对您有所帮助。

 @using Org.BouncyCastle.Math;
 @{
    BigInteger bi = new BigInteger("100");    
  }
© www.soinside.com 2019 - 2024. All rights reserved.