C#操作字符串方法总结staticvoidMain(string[]args){strings="";//(1)字符访问(下标访问s[i])s="ABCD";Console.WriteLine(s[0]);//输出"A";Console.WriteLine(s.Length);//输出4Console.WriteLine();//(2)打散为字符数组(ToCharArray)s="ABCD";char[]arr=s.ToCharArray();//把字符串打散成字符数组{'A','B','C'...
查看全文