public static bool TryParseInt(string s, out int i) { i = 0; try { i = int.Parse(s); return true; } catch { return false; } }