Share via


CountryRegionInfo.FriendlyName Property

The short name of the country or region. String.

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

Remarks

  • The FriendlyName property is localized depending on the language indicated by the UserInfoHeader.Culture property.
  • For a table of MapPoint Web Service FriendlyNames property values, see CountryRegion Entity IDs.
  • The official name of the country or region is returned in the OfficialName 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 

'Populate a drop-down list box with names of countries or regions
Dim myCountryRegionInfo() As CountryRegionInfo
myCountryRegionInfo = commonService.GetCountryRegionInfo(Nothing)

Dim i As Integer
For i = 0 To myCountryRegionInfo.Length - 1
    ListBox1.Items.Add(myCountryRegionInfo(i).FriendlyName)
Next i

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

//Populate a drop-down list box with names of countries or regions
CountryRegionInfo[] myCountryRegionInfo;
myCountryRegionInfo = commonService.GetCountryRegionInfo(null);

for(int i = 0; i < myCountryRegionInfo.Length; i++)
{
    ListBox1.Items.Add(myCountryRegionInfo[i].FriendlyName);
}
 

See Also

CountryRegionInfo Class | UserInfoHeader.Culture Property | CountryRegion Entity IDs | CountryRegionInfo.OfficialName Property