很菜,求一个题:编写一个函数使形如“Good afteroon sir”变成“sir afternoon Good”
编写一个函数使形如“Good afteroon sir”变成“sir afternoon Good”
谢谢!~~
------解决方案--------------------string str = "Good afteroon sir ";
string[] astr = str.Split( ' ');
Array.Reverse(astr);
str = string.Join( " ", astr);