I read this from msdn about Int32.TryParse()
Int32.TryParse()
When this method returns, contains the 32-bit signed integer value equivalent to the num
TryParse() returns a Boolean.
Int32 testInt; if (!Int32.TryParse("123", out testInt)) { MessageBox.Show("Is not a Int32!"); return; // abbrechen } MessageBox.Show("The parst Int32-value is " + testInt);