public static Country GetCountryByISO(string countryIsoCode) { if (string.IsNullOrWhiteSpace(countryIsoCode)) { return(null); } return(COUNTRIES.FirstOrDefault(c => c.Code == countryIsoCode)); }
public static Country[] GetCountries() { return(COUNTRIES .Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries) .Select((country, index) => new Country { id = index, name = country }).ToArray()); }