日期:2014-05-17  浏览次数:21012 次

将一个字符串数组的元素的顺序进行反转(C#)
string[] str = { "逆", "序", "输", "出" };
            for (int n = 0; n < str.Length; n++)
            {
                Console.Write("{0}  ", str[n]);
            }
            Console.Write("\n数组逆序输出:");
            string[] arrystr = str.ToArray();
            Array.Reverse(arrystr);
            for (int i = 0; i < arrystr.Length; i++)
            {
                Console.Write(arrystr[i]);
            }