将一个字符串数组的元素顺序时行反转

//练习:将一个字符串数组的元素顺序时行反转
string[] names={"我","是","好人"};
for(int i=0;i<names.Length/2;i++)
{
string temp=names[i];
names[i]=names[names.Length-1-i];
names[names.Length-1-i]=temp;
}

原文地址:https://www.cnblogs.com/iceberg2008/p/4082891.html