I need to get the numeric codes of ISO 3166-1 countries in C#.
It seems with the RegionInfo
class I can only get the Alpha2 and Alpha3 codes. Is it possible to get the ISO 3166-1 numeric codes in C#?
I need to get the numeric codes of ISO 3166-1 countries in C#.
It seems with the RegionInfo
class I can only get the Alpha2 and Alpha3 codes. Is it possible to get the ISO 3166-1 numeric codes in C#?
I've created a extension method for RegionInfo in order to retrieve the numeric value. It's similar to the solution mentioned by Dmitry Bychenko, but I need an extension method and I want a current version of the iso 3166 records:
Extension method class: