I have the following code:
var culture = CultureInfo.CurrentUICulture;
var regionInfo = new RegionInfo(culture.TwoLetterISOLanguageName);
The region name he should not correspond to neutral culture; a
specific culture name is required.
he is a region neutral culture as shown by this code
new CultureInfo("he").IsNeutralCulture; // true
RegionInfo that takes an
int constructor words the exception in a different way that I found easier to understand.
new RegionInfo(new CultureInfo("he").LCID) // Culture ID 13 (0x000D) is a neutral culture; a region cannot be created from it.
Try with a more specific culture name, for example
he-il for Israel.
new RegionInfo("he-il") does not throw an exception.
As for your other examples...
esis both the region-neutral language code for Spanish AND the country code for Spain (
RegionInfoalso accepts a country code) so that's why it works
aris both the region-neutral language code for Arabic AND the country code for Argentina (so it "worked", but you will not get expected results)
zhis the region-neutral code for Chinese and it should not have worked. Though if you tried
cnit worked because it's the country code.