What is the best way to convert between char* and System::String in C++/CLI

前端 未结 5 630
情深已故
情深已故 2020-11-29 01:07

What is the approved way to convert from char* to System::string and back in C++/CLI? I found a few references to marshal_to<> templated functions on Google, but it appea

5条回答
  •  没有蜡笔的小新
    2020-11-29 01:34

    There's a good overview here (this marshaling support added for VS2008): http://www.codeproject.com/KB/mcpp/OrcasMarshalAs.aspx

提交回复
热议问题