string inp = Console.ReadLine(); //获取输入 char[] r = inp.ToCharArray(); //将字符串转换成字符数组 Array.Reverse(r); //使用Array的Reverse函数对字符数组实现翻转 string res = new string(r); //将字符数组转换成字符串