예제 #1
0
        public static void DisplayCountries()
        {
            List <string> countries = ContriesTextFile.GetCountries();

            foreach (string country in countries)
            {
                Console.WriteLine(country);
            }
        }
예제 #2
0
        // Refactor into user a Country Model.
        private static void AddCountry()
        {
            Console.Write("Name of country: ");
            string countryName = Console.ReadLine();

            ContriesTextFile.WriteCountries(countryName);

            Console.WriteLine("This country has been saved!");
        }