Sammut <sa*****@hotmail.com> wrote:
I am using the following
Text = Convert.ToChar(67).ToString() & this will give a "C"
How can I do the opposite that is pass a "C" and an integer value is returned.
The above is pretty unnecessary, to be honest. You can get away without
Convert - just cast:
char c = (char)67;
string s = c.toString();
and the other way round:
string s = "C";
char c = s[0]; // First character in s
int i = c; // i=67 now
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too