c#Reverse字符串
class Program { static void Main(string[] args) { // 输出 ypoc si yek eht string str = "the key is copy"; char[] arr = str.ToCharArray(); Array.Reverse(arr); var result = new string(arr); //输出 copy is key the string[] ss = str.Split(new string[] { " " }, StringSplitOptions.None); var resilt = ss.Reverse(); var temp = String.Join(" ", resilt); Console.WriteLine(temp); Console.ReadKey(); } }