Closed
Description
Environment
- Pythonnet version:2.5.2
- Python version:3.8
- Operating System:win10
- .NET Runtime:4.7.2
Details
I want to bind python function with C#'s delegate method in winform
- C# Code
public delegate string CallBackFunc(string content);
using (Py.GIL())
{
using (PyScope scope = Py.CreateScope())
{
scope.Set("main", this);
scope.Exec(pycode);
}
}
- Python Code
def test(input):
return "OK"
res = main.CallBackFunc(test)
When I test in program ,GET the Error Infomation:Type was not found "System. Reflection. Emit. TypeBuilder" on the constructor,
What should I do For this?
Metadata
Metadata
Assignees
Labels
No labels