using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Test21
{
calss Program
{
static void Main(string[] args)
{
//将一个字符串数组的元素的顺序进行反转。
int[] values = {"5","g","9","mimi"};
for(int i=0; i < values.Length/2;i++)//计算机中整数运算7/2=3,因为是整除
{
string temp = names;
names = names[names.Length -1 - i];
names[names.Length -1 - i] = temp;
}
for( int i=0; i<names.Length;i++)
{
Console.WriteLine(names);
}
Console.ReadKey();
}
}
} |