字符串转换成Char数组 1 string str = "abcdefghijklmnopqretuvwxyz" ; 2 char [] chars = str . ToCharArray (); char数组转换成字符串 1 char [] chars = new char []{ 'a' , 'b' , 'c' , 'd' }; 2 string str = new string ( chars );
字符串转换成Char数组
1 string str="abcdefghijklmnopqretuvwxyz";
2 char[] chars=str.ToCharArray();
char数组转换成字符串
1 char[] chars=new char[]{'a','b','c','d'};
2 string str=new string(chars);