- public static byte[] ToByteArray(string str)
- {
- System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
- return encoding.GetBytes(str);
- }
- //该片段来自于http://www.codesnippet.cn/detail/300520133687.html
来源: http://www.codesnippet.cn/detail/300520133687.html