Char[]与string 转换
string 转换成 Char[]
string ss = "abcdefg";
char[] cc = ss.ToCharArray();
Char[] 转换成string
string s = new string(cc);
此外,byte[] 与 string 之间的装换
byte[] bb = Encoding.UTF8.GetBytes(ss);
string s = Encoding.UTF8.GetString(bb);
string 转换成 Char[]
string ss = "abcdefg";
char[] cc = ss.ToCharArray();
Char[] 转换成string
string s = new string(cc);
此外,byte[] 与 string 之间的装换
byte[] bb = Encoding.UTF8.GetBytes(ss);
string s = Encoding.UTF8.GetString(bb);