using System.Text;
byte[] data = Encoding.Unicode.GetBytes("工作愉快");
string s1="";
for (int i = 0; i < data.Length / 2; i++)
{
s1 += data[2 * i + 1].ToString("x2"); //注意高低字节
s1 += data[2 * i ].ToString("x2");
}
this.txtUnicode.Text = s1.ToUpper();
//结果:5DE54F5C61095FEBFF01 工作愉快