pip install pythonnet python import clr import System from System.Collections import * clr.AddReference("System") clr.AddReference("System.Collections") python clr.AddReference("Path/To/Your/DotNetAssembly.dll") from Namespace import ClassName instance = ClassName() result = instance.MethodName() python py_list = [1, 2, 3, 4, 5] net_list = ArrayList(py_list) result = instance.MethodName(net_list) python net_object = instance.MethodName() py_object = clr.Convert(net_object, PythonObjectType) py_object.MethodName()


上一篇:
下一篇:
切换中文