Convert char to byte

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
Hello,
I have written the following code
byte[] myarray = new byte[name.Length * 2];
foreach(char c in name) {
byte b = (byte) c;
}
My problem is that the name contains korean characters and therefore is double byte. So how to convert character to double byte?

View the full article
 
Back
Top