C#移除字符串最后一位字符

string str="1,2,3,";
str= str.Remove(str.LastIndexOf(","), 1);
结果:1,2,3
posted @ 2011-03-14 11:10  Xia.CJ  阅读(733)  评论(2编辑  收藏  举报