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++)?
(This may no longer be relevant since SLaks has found that ingenious link, but I'll leave an edited version for reference...)
The "normal" way of exposing .NET/C# objects to unmanaged code (like Python) is to create a COM-callable wrapper for the C# DLL (.NET assembly), and call that using Python's COM/OLE support.  To create the COM-callable wrapper, use the tlbexp and/or regasm command-line utilities.
Obviously, however, this does not provide the C/DLL-style API that SLaks' link does.
How to export C# methods?