TestimoX

API Reference

Class

CountryLookup

Namespace ADPlayground.Globalization
Assembly ADPlayground
Modifiers static

Country/region helpers: map country to continent and resolve ISO codes from names. Mirrors functionality of the PowerShell helpers in a reusable .NET form.

Inheritance

  • Object
  • CountryLookup

Methods

public static String GetContinent(String country) #
Returns: String

Returns a continent for a given English country name; returns "Unknown" if not found.

Parameters

country System.String requiredposition: 0
public static IReadOnlyDictionary<String, ValueTuple<CultureInfo, RegionInfo>> GetCultureLookup() #
Returns: IReadOnlyDictionary<String, ValueTuple<CultureInfo, RegionInfo>>

Exposes the internal culture lookup table (name -> Culture, Region) for advanced use.

public static Boolean TryGetEnglishName(String countryCode, out String name) #
Returns: Boolean

Attempts to resolve an English country name from a two/three-letter ISO code.

Parameters

countryCode System.String requiredposition: 0
name System.String@ requiredposition: 1
public static Boolean TryGetTwoLetterIso(String country, out String code) #
Returns: Boolean

Attempts to resolve a two-letter ISO country code from an English country name or alias.

Parameters

country System.String requiredposition: 0
code System.String@ requiredposition: 1