【发布时间】:2010-01-17 18:49:24
【问题描述】:
我们如何导出 C# 方法?
我有一个 dll,我想在 Python 语言中通过 ctypes 模块使用它的方法。 因为我需要使用 ctypes 模块,所以我需要导出 C# 方法以便它们在 Python 中可见。
那么,如何导出 C# 方法(就像在 C++ 中所做的那样)?
【问题讨论】:
-
python.net 允许使用 Python C-API 和 .NET Pinvoke 和非托管导出在 Python 和 .NET 之间进行双向互操作,如下所述。所以所有的硬文都是为你写的! pythonnet.github.io
标签: c# python methods export python.net