This method takes away the need for writing two lines for TryParse and gives users an option of returning a default number.
Source
public static int TryParse(this string input, int defaultValue)
{
int value;
if (Int32.TryParse(input, out value))
{
return value;
}
return defaultValue;
}