Best practice of converting string to int:
int myValue;
int defaultValue = 10;

myValue = int.TryParse("100", out myValue)? myValue : defaultValue;