C#删除最后一个结尾的逗号的代码

内容之余,把内容过程较好的内容段记录起来,如下的内容是关于C#删除最后一个结尾的逗号的内容,应该能对小伙伴们有用处。

    public static string DelLastComma(string str)
    {
        return str.Substring(0, str.LastIndexOf(","));
    }

猜你喜欢

转载自blog.51cto.com/14129393/2383093