public void WelcomeAction() { bool programStart = true; while (programStart) { CountryListView cv = new CountryListView(CountryDb); Console.WriteLine("Hello please pick a country from the following list using the corresponding number: "); Console.WriteLine(); cv.DisplayList(CountryDb); string input = Console.ReadLine(); try { int numInput; int.TryParse(input, out numInput); if (numInput >= 0 && numInput < CountryDb.Count) { CountryView ccv = new CountryView(CountryDb[numInput]); ccv.Display(CountryDb[numInput]); } } catch (Exception e) { Console.WriteLine("Sorry not a number"); programStart = true; } } }
public void CountryAction(Country c) { CountryView v = new CountryView(c); v.Display(c); }