Share via


CountryRegionInfo.OfficialName Property

The official name of the country or region. String.

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

Remarks

  • The OfficialName property is localized depending on the language indicated by the UserInfoHeader.Culture property.
  • For a table of MapPoint Web Service OfficialName property values, see CountryRegion Entity IDs.
  • The short name of the country or region is returned in the FriendlyName property.

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 | UserInfoHeader.Culture Property | CountryRegion Entity IDs | CountryRegionInfo.FriendlyName Property