从数据表之类的东西连接字符串时,最快/最少的资源成本移动是什么?例如:
for (int i = 0; i < darray.Length; i++)
{
str_orderbycity += darray[i]["Sort_Order"].ToString() + ",";
if (i < (darray.Length - 1))
{
str_orderbycity += ",";
}
}
或等到最后,然后在字符串上运行 remove 方法:
str_orderbycity = str_orderbycity.Remove(str_orderbycity.Length - 1, 1);
我只是好奇...
谢谢