int t1 = Convert.ToInt32(s1,16); int t2 = Convert.ToInt32(s2,16);
array[0] = (byte)t1; array[1] = (byte)t2;
string s = System.Text.Encoding.Unicode.GetString(array);
//default方式反解碼為漢字 array[0] = (byte)196; array[1] = (byte)207; s = System.Text.Encoding.Default.GetString(array);
//取字符串長度 s = "iam方槍槍"; int len = s.Length;//will output as 6 byte[] sarr = System.Text.Encoding.Default.GetBytes(s); len = sarr.Length;//will output as 3+3*2=9