Although you can, I wouldn't do it.
Doing it that way relies on the user not modifying the value and inserting a non-numeric value.
The easiest way is to keep the current invoice number as a class level integer variable, and increment it when necessary and re-write the contents of the text box.
private int invoiceNumber = 1000;
...
private void NextInvoice()
{
invoiceNumber++;
TextBoxForInvoiceNumber.Text = invoiceNumber.ToString("000000");
}
But I would use either a Label instead of a TextBox, or make the TextBox ReadOnly property true.
If you must use the TextBox content, you have to do:
private void NextInvoice()
{
int invoiceNumber = int.Parse(TextBoxForInvoiceNumber.Text);
invoiceNumber++;
TextBoxForInvoiceNumber.Text = invoiceNumber.ToString("000000");
}
And remember to add error trapping and so forth to prevent your app falling over when the user makes a small mistake...