Closed Thread
Results 1 to 2 of 2

Thread: How do I?

  1. #1
    Crane's Avatar
    Crane is offline Programming Expert
    Join Date
    Nov 2005
    Posts
    398
    Rep Power
    25

    How do I?

    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.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jordan Guest
    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.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts