How to SWIG std::string& to C# ref string
问题 I'm trying to convert a C++ function with std::string reference to C#. My API looks like this: void GetStringDemo(std::string& str); Ideally I would like to see something like this from C# void GetStringDemoWrap(ref string); I understand I need to create a typemap for this, and I tried a few things by playing around with the std_string.i file, but I don't think I'm getting anywhere. Does anyone has any example. I'm new to both Swig and C# so I'm not able to come up with any genuine ideas. 回答1