// Create a random amount of countries public void CreateRandomCountries(int randomNum) { List <Country> countries = new List <Country>(); Random random = new Random(); for (int i = 0; i < randomNum; i++) { Country c = new Country { CountryName = RandomString(false), }; foreach (Country country in countries) { if (country.CountryName == c.CountryName || adminF.GetCountryNameByName(adminT, country.CountryName) == c.CountryName) { i--; } continue; } adminF.CreateNewCountry(adminT, c); countries.Add(c); } }