Why does RegionInfo.TwoLetterISORegionName return 3 chars for Caribbean?

803 views Asked by At

Trying to generate currency type seed data for an application and iterating through the CultureInfo collection of System.Globalization. I kept getting truncation errors on my insert statements until I discovered that when Caribbean comes up (listed at MSDN as CB) a 3 character value of 029 on the TwoLetterISORegionName. I had a serious WTF moment.

Does anyone know why this happens?

To reproduce:

Instantiate the RegionInfo object for the Caribbean.

RegionInfo region = new RegionInfo(9225);

Access the TwoLetterISORegionName property. Value should be CB. Actual value is 026.

1

There are 1 answers

3
jCoder On BEST ANSWER

It looks like there is no ISO-3166 2-letter ISO Country Code based on the ISO Website. The same goes for the Wikipedia ISO 3166-1 page.

It is quite interesting that Carribean is listed by MSDN. Maybe this is because RegionInfo also applies to geographical regions and not only to countries, but that's just a guess.