110,566
社区成员
发帖
与我相关
我的任务
分享
char[] array = { 'a', 'b', 'c', 'd' };
byte[] bytes = System.Text.Encoding.Default.GetBytes(array);
char[] chars = new char[] { 'a', 'b', 'c' };
byte[] bytes = chars.Select(c => (byte)c).ToArray<byte>();
System.Text.Encoding.Unicode.GetBytes(chars)