asp.net 去除字符串右侧的最后一个字符

string str = "HTML,Asp/Aspx,MySQL/Cgi/Java/Php,";
        str 
= str.Remove(str.LastIndexOf(","),1);
        Response.Write(str); 

string a = "1,3,5,";
        Response.Write(a.TrimEnd(
',')); 
posted @ 2008-04-30 16:56  一抹微蓝  阅读(1080)  评论(1编辑  收藏  举报