Reverse倒序

1 string a = Console.ReadLine();
2 
3 //char[] c = new char[a.Length];
4 
5 //Reverse 让其倒序
6 char[] c = a.Reverse().ToArray();
7 // string ab = c.ToString();
8 string ab = new string(c);//用到构造函数。。重新声明一个string类型
9 Console.WriteLine(ab);

 

posted @ 2013-10-23 10:59  豆豆0829  阅读(127)  评论(0编辑  收藏  举报