string转换成byte[] string sdata = "我是一个字符串";Encoding code = Encoding.GetEncoding("utf-8");byte[] buffer = code.GetBytes(sdata);