private static RoomType GetRoomTypeFromUser() { var chosenType = In(new[] { "Single", "Double", "Family" }, validationFunction: (iter, item) => iter.ToLower().Contains(item.ToLower())); RoomTypes types; bool success = RoomTypes.TryParse(chosenType, ignoreCase: true, result: out types); if (!success) { Out("General Failure."); return(null); } RoomType type = RoomType.Get(types); return(type); }