N
Nick
Hi,
I would like to know what method can show the unicode value of string
and char in C#
Thanks.
I would like to know what method can show the unicode value of string
and char in C#
Thanks.
Nick said: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);
}
Etienne Boucher said:long is a System.Int64, you'd be better using a short, since it's a 16bit
type like char.