我是 vb.net 的新手。我正在尝试从 vb.net 调用 python 函数,但出现“Invoke”不是“Microsoft.Scripting.Hosting.ObjectOperations”成员的错误
Imports Microsoft.Scripting
Imports Microsoft.Scripting.Hosting
Imports IronPython.Hosting
Sub Main
Dim engine As ScriptEngine
Dim scope As ScriptScope
Dim i As Integer
engine = Python.CreateEngine()
scope = engine.ExecuteFile("C:\Working.py")
Dim v = engine.Operations.Invoke(scope.GetVariable(methodName))
' 需要调用并获取返回值的方法的名称。谁能推荐我更好的方法来完成这项工作?我已经看过这个链接: http: //msmvps.com/blogs/theproblemsolver/archive/2008/08/14/calling-ironpython-functions-from-net.aspx
先感谢您。