C#实现字符串倒序的写法
本文实例为大家分享了C#字符串倒序写法的实现代码,供大家参考,具体内容如下 //string concatenation with for loop public string ReverseA(string text) { char[] cArray = text.ToCharArray(); string reverse = String.Empty; for (int i = cArray.Length - 1; i > -1; i--) { reverse += cArray[i]; } return reverse; } // Array.Rever
用户评论