字符串倒序
我在网上查了这么个代码,可是下面的这句看不懂哈,各位师哥师姐能讲下否?// string[] strArr = Array.ConvertAll<char, string>(chr, delegate(Char c) { return c.ToString(); });
代码为:
string str;
Console.WriteLine("Enter a string:");
str=Console.ReadLine();
char[] chr = str.ToCharArray();
Array.Reverse(chr);
string[] strArr = Array.ConvertAll<char, string>(chr, delegate(Char c) { return c.ToString(); });
str = string.Join("", strArr);
Console.WriteLine(str);