iso3166
iso3166 copied to clipboard
feat: Added dictionary for country collection
The idea is to have the countries information stored in a HashTable data structure, allowing us to reduce the lookup operation from O(n) to O(1).
E.g:
Country country = ISO3166.Country.Countries["DK"];
Country country = ISO3166.Country.Countries["dk"];
Also instantiated the dictionary with StringComparer.OrdinalIgnoreCase so the lookup operation can be case-insensitive.
To prevent breaking changes, the dictionary was created as ISO3166.Country.Countries and maintained ISO3166.Country.List, initializing it based on ISO3166.Country.Countries upon first use.