Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class countryList
- {
- public static void Main()
- {
- ArrayList countries = new ArrayList();
- country c1 = new Country("korea", "asia");
- country c2 = new Country ("UNITED KINGDOM","Europe");
- country c3 = new Country ("Canada","North America");
- country c4 = new Country ("South Africa","Africa");
- countries.Add(c1);
- countries.Add(c2);
- countries.Add(c3);
- countries.Add(c4);
- foreach (Country country in countries)
- {
- Console.WriteLine("Name:{0}m \n\tContinent:{1}",country.Name,country.Continent);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement