0

I have a class (String) that I want to be able to implicitly convert to a char. How would I go about doing this? I know to do it the other way around, I just add a constructor that just takes a char as a parameter, but to convert from String to char implicitly? Thanks.

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by chaines51
0

I have a class (String) that I want to be able to implicitly convert to a char. How would I go about doing this? I know to do it the other way around, I just add a constructor that just takes a char as a parameter, but to convert from String to char implicitly? Thanks.

This any help???:
http://support.microsoft.com/?kbid=311259

0

Actually, I just wanted to convert it to char (as in, a single character).

And, I did search, I just was obviously not using the right terms, IE conversion operator.

Thanks for your help!
Cody

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.