How to export C# methods?
How can we export C# methods? I have a dll and I want to use its methods in the Python language with the ctypes module. Because I need to use the ctypes module, I need to export the C# methods for them to be visible in Python. So, how can I export the C# methods (like they do in C++)? Contrary to popular belief, this is possible. See here . With the normal Python implementation ("CPython"), you can't, at least not directly. You could write native C wrappers around our C# methods using C++/CLI , and call these wrappers from Python. Or, you could try IronPython . This lets you run Python code