+ -
当前位置:首页 → 问答吧 → python与c#结合

python与c#结合

时间:2011-03-18

来源:互联网

我用python的dic类型从文件中读出数据,应该把这个dic赋给c#中的什么类型呢?求教一下c#和python类型转换和衔接的问题

 Hashtable tb =(Hashtable) script.checkformat(txtCheck.Text.Trim());
无法将类型“IronPython.Runtime.PythonDictionary”转换为“System.Collections.Hashtable”

作者: aiaitiantian   发布时间: 2011-03-18

这个错误信息不是说了吗,就是IronPython.Runtime.PythonDictionary。
把变量声明成IronPython.Runtime.PythonDictionary就行了。

作者: iambic   发布时间: 2011-03-18