C#字符串转换成字节数组
using System.Text; public static byte[] ConvertStringToByteArray(string stringToConvert) { return (new UnicodeEncoding()).GetBytes(stringToConvert); }
C#字符串转换成字节数组
using System.Text; public static byte[] ConvertStringToByteArray(string stringToConvert) { return (new UnicodeEncoding()).GetBytes(stringToConvert); }