Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# get country code

var regions = CultureInfo.GetCultures(CultureTypes.SpecificCultures).Select(x => new RegionInfo(x.LCID));
var englishRegion = regions.FirstOrDefault(region => region.EnglishName.Contains("United Kingdom"));
var countryAbbrev = englishRegion.TwoLetterISORegionName;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #country #code
ADD COMMENT
Topic
Name
7+9 =