Is it possible to get a pointer to String^'s internal array in C++/CLI?
- by CannibalSmith
The goal is to avoid copying the string data when I need a const wchar_t*.
The answer seems to be yes, but the function PtrToStringChars doesn't have its own MSDN entry (it's only mentioned in the KB and blogs as a trick). That made me suspicious and I want to check with you guys. Is it safe to use that function?