int value; if (int.TryParse(myTextBox.Text, out value)) myTextBox.Text.Text = (++value).ToString(); else // do something when the text cannot be parsed as integer
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)