2011年6月23日 星期四

字串轉ASCII碼

protected void Button1_Click(object sender, EventArgs e)
{

byte[] b = System.Text.Encoding.ASCII.GetBytes("dw33f");

Label1.Text = b[1].ToString();

Label2.Text =System.Text.Encoding.ASCII.GetString(b);

}

沒有留言:

張貼留言