Hi so I am creating this program and I have a checkbox with a text box
I am using
to remove a , at the very end of a list in the textbox. When I check the box it works, and deletes the , at the end, but when I uncheck the box I get the following error "System.ArgumentOutOfRangeException: 'StartIndex cannot be less than zero.
Parameter name: startIndex'"
what can I do to get around this?
I am using
Code:
textbox.Text = textbox.Text.Remove(textbox.Text.LastIndexOf(","c), 1)
Parameter name: startIndex'"
what can I do to get around this?