If the text component of the string is unknown (with or without a number at the end of the string), variations of this function may be helpful:
private string increment_number_at_end_of_string(string text_with_number_at_the_end)
{
string text_without_number = text_with_number_at_the_end.TrimEnd('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
string just_the_number = text_with_number_at_the_end.Substring(text_without_number.Length);
int number = -1;
if (int.TryParse(just_the_number, out number))
{
return text_without_number + (number + 1).ToString();
}
return text_with_number_at_the_end;
}