Skip to content

Remove a character from the end of a string…

The following removes all commas from the end of a string.

            while (str.ToString().EndsWith(","))
            {
                str = str.Remove(str.Length - 1, 1);
            }
Published in.NetCoding

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *