我有下面的C代码来编译它我的数学.dll装配。在
namespace MyMath {
public class Arith {
public Arith() {}
public int Add(int x, int y) {
return x + y;
}
}
}
我有下面的IronPython代码来使用这个对象。在
^{pr2}$当我用IronPython运行这段代码时,我得到以下错误。在
Traceback (most recent call last): File ipycallcs, line unknown, in Initialize NameError: name 'Arith' is not defined
可能出了什么问题?在
arith=arith()应该是arith=我的数学。阿里斯()
您应该执行以下操作:
或者:
^{pr2}$否则,必须将
Arith
类称为我的数学。阿里斯. 在相关问题 更多 >
编程相关推荐