How do I convert a Char to a __gc Char?????
I'm trying to pass a Char in a function but I receive a compiler error.
What function are you trying to pass it too?
You can always convert it to a string and then back to a char like:
Char chars; /// Regular Char
Char myGCChar[]; // __gc Char
String* test = Convert::ToString(chars); // Convert
myGCChar = test->ToCharArray(); // Back to Char
There may be a better way to do it but this is the only way I've found. It will allow you to use this managed char in String split functions such as:
String* split[] = myString->Split( myGCChar );
Hope this helps.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks