private static int? ReadInt(string value) { int num; if (!int.TryParse(value, out num)) { return null; } return num; } }