Python 到 C# StongBox[单]
Python to C# StongBox[Single]
我使用 IronPython 添加了对 C# dll 的引用。我试图在 DLL 中使用一个方法,它需要一个类型的参数:
out float tempValue
当我将 python 浮点对象传递给方法时,我得到以下回溯:
Traceback (most recent call last):
File "MeasurementComputing.py", line 20, in <module>
TypeError: expected StrongBox[Single], got float
我的问题是:
- 什么是保险箱[Single]
- 如何在 python 中创建这样一个对象以传递给 C# 方法。
我使用 IronPython 添加了对 C# dll 的引用。我试图在 DLL 中使用一个方法,它需要一个类型的参数:
out float tempValue
当我将 python 浮点对象传递给方法时,我得到以下回溯:
Traceback (most recent call last):
File "MeasurementComputing.py", line 20, in <module>
TypeError: expected StrongBox[Single], got float
我的问题是:
- 什么是保险箱[Single]
- 如何在 python 中创建这样一个对象以传递给 C# 方法。