Share via


CountryRegionInfo.Iso2 Property

The ISO (International Organization for Standardization) two-letter country code (valid for countries or regions only). String.

Public Dim Iso2 As String
    Member of [Namespace].CountryRegionInfo
[C#]
public System.String Iso2
    Member of [Namespace].CountryRegionInfo

Remarks

  • In some cases where the ISO 3166-1 standard does not contain a two-letter code for a country or region, MapPoint Web Service uses the ISO 3166-2 code that includes the country or region code appended with a sub-country or sub-region code. If there is no sub-country or sub-region code, the Iso2 property is null.
  • For a table of MapPoint Web Service Iso2 property values, see CountryRegion Entity IDs.

Example

 
[Visual Basic] 
'This example assumes that the service instance 
''commonService' has already been created and that 
'the MapPoint Web Service namespace has been imported 

'Get CountryRegionInfo for the United States
Dim entityIDs(0) As Integer
entityIDs(0) = 244
Dim myCountryRegionInfo() As CountryRegionInfo
myCountryRegionInfo = commonService.GetCountryRegionInfo(entityIDs)

'Output the information
Console.WriteLine(myCountryRegionInfo(0).FriendlyName)
Console.WriteLine(myCountryRegionInfo(0).EntityID.ToString())
Console.WriteLine(myCountryRegionInfo(0).Iso2)
Console.WriteLine(myCountryRegionInfo(0).Iso3)
Console.WriteLine(myCountryRegionInfo(0).OfficialName)
Console.WriteLine(myCountryRegionInfo(0).LatLong.Latitude.ToString() _
    + ", " + myCountryRegionInfo(0).LatLong.Longitude.ToString())

 
[C#]
//This example assumes that the service instance 
//'commonService' has already been created and that 
//the MapPoint Web Service namespace has been imported 
            
//Get CountryRegionInfo for the United States
int[] entityIDs= new int[1];
entityIDs[0] = 244;
CountryRegionInfo[] myCountryRegionInfo;
myCountryRegionInfo = commonService.GetCountryRegionInfo(entityIDs);

//Output the information
Console.WriteLine(myCountryRegionInfo[0].FriendlyName);
Console.WriteLine(myCountryRegionInfo[0].EntityID.ToString());
Console.WriteLine(myCountryRegionInfo[0].Iso2);
Console.WriteLine(myCountryRegionInfo[0].Iso3);
Console.WriteLine(myCountryRegionInfo[0].OfficialName);
Console.WriteLine(myCountryRegionInfo[0].LatLong.Latitude.ToString() 
    + ", " + myCountryRegionInfo[0].LatLong.Longitude.ToString());


 

See Also

CountryRegionInfo Class | CountryRegion Entity IDs