Nick <ni*****@heha.net.tw> wrote:
I would like to know what method can show the unicode value of string
and char in C#
Well, a string is just a series of characters, so access each one in
turn. You can find the unicode value of a character by just casting it
char. For instance, this prints out the unicode value of each character
in a string:
foreach (char c in theString)
{
Console.WriteLine ((int)c);
}
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too