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
using C# 7 now you can declare the variable within the TryParse like ...
if (Int32.TryParse(someText, out int value)) { // Parse successful. value can be any integer } else { // Parse failed. value will be 0. }