字符串转为byte[]
byte[] inValue = Encoding.Default.GetBytes(revM.Text.Trim());
byte[]转为string
byte[] inValue = new byte[28 * 4];
rfidDataE.Text = Encoding.Default.GetString(inValue, 0, inValue.Length);
System.Text命名空间中的Encoding类编码格式:
ASCII
UTF8
Default
Unicode
这些在编程中经常需要用到的技巧。