Iso3166FromPhoneCode Method
Looks up the country represents by its phone code
Namespace: MobileTrack.Common.ModelsAssembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
public static Iso3166Country? FromPhoneCode(
string phoneCode
)
- phoneCode String
- The national phone code (or one of its phone codes)
Iso3166CountryThe country representing the
phoneCode
It grabs the longest dial code it can find; this is because of North America's 1, which is also used in other countries,
so in those cases we apply the region code to the nation code; If, therefore, we get multiple results, the longest one is the correct one.