private int ReadInt(string s, int defaultVal) { try { return Convert.ToInt32(s); } catch (FormatException) { return defaultVal; } }