我想一些简单的转"this is a test"成
"this is a test"
new string[] {"t","h","i","s"," ","i","s"," ","a"," ","t","e","s","t"}
我真的需要做些什么
test = "this is a test".Select(x => x.ToString()).ToArray();
编辑:澄清一下,我不需要一个char数组,理想情况下,我想要一个字符串数组。除了我认为有一种更简单的方法外,我实际上没有发现上述代码有什么问题。
我相信这就是您要寻找的:
char[] characters = "this is a test".ToCharArray();