Mark Michaelis' Weblog :
Updated: 9/1/2004; 6:55:15 AM.

 








Subscribe to "Mark Michaelis' Weblog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

Subscribe To
Mark's Weblog

 
 

Sunday, January 12, 2003

Convert String to Byte
Google Search It

This is just a quick note on the way to convert a string to a byte since there is no method available in System.Convert.

string s = "this is a test";
byte[] b = new byte[20];
b = System.Text.Encoding.UTF8.GetBytes(s);
for (int i=0; i<b.Length;i++)
{
    Console.WriteLine((char)b[i]);
}


4:15:10 PM   []    comment []

© Copyright 2004 Mark Michaelis.



 


January 2003
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Dec   Feb


Recent Posts