int resultValue = 0;
if (int.TryParse(textBox1.Text, out resultValue))
{
// It was an integer in the text box
MessageBox.Show(resultValue.ToString());
}
else
{
{
// It was NOT an integer in the text box
}
}
No comments:
Post a Comment