String s=a,b,c,d,e,f,g;怎麼排序。倒著排序
string s = "a,b,c,d,e,f,g";
string[] str = s.Split(',');
string dec = "";
for (int i = 0; i < str.Length; i++)
{
if (i == str.Length - 1)
{
dec += str[str.Length - 1 - i];
}
else
{
dec += str[str.Length - 1 - i] + ",";
}
}