1 //字符串转char数组 2 3 string str="a1b2c3"; 4 char[] c=str.toArray(); 5 6 //char[]转字符串 7 8 str=new String(c);