System::String to wstring

  • Thread starter Thread starter Tao
  • Start date Start date
T

Tao

hi.. group,

quick question: how to convert a managed data type system::string to
unmanaged wstring?

thanks.
 
Tao said:
quick question: how to convert a managed data type system::string to
unmanaged wstring?

Something like this:

#include <vcclr.h>

wchar_t __pin *pStr = PtrToStringChars(s);

should get you a pointer to the constituent characters.

Regards,
Will
 
Back
Top