Share via


CommonServiceSoap.GetCountryRegionInfo Method

Returns information about one or more countries or regions as an array of CountryRegionInfo[] objects.

Public NotOverridable Function GetCountryRegionInfo
  ( ByVal entityIDs As Integer() ) As
  [Namespace].CountryRegionInfo()
    Member of [Namespace].CommonServiceSoap  
  
[C#]
public [Namespace].CountryRegionInfo[]
  GetCountryRegionInfo ( int[] entityIDs )
    Member of [Namespace].CommonServiceSoap

Parameters

  • entityIDs
    An array of integers representing the Entity.ID property of the countries or regions for which information is returned. Valid range is 0 through 500. Optional.

Remarks

  • If entityIDs is null, the CountryRegionInfo objects for all countries or regions are returned.
  • The returned CountryRegionInfo[] array length is the same as the length of the entityIDs[] array that is passed in.
  • If any of the integers passed in entityIDs does not represent a valid country or region entity ID, the CountryRegionInfo.EntityID for that integer contains the passed integer and all other CountryRegionInfo properties for that integer are null.
  • For a table of MapPoint Web Service EntityIDs for countries or regions, see CountryRegion Entity IDs.

Example

 
[Visual Basic] 
'This example assumes that the MapPoint Web Service 
'namespace has been imported

'Instantiate the service variable and set up the Entity ID array
Dim commonService As New CommonServiceSoap()
Dim entityIDs(0) As Integer
entityIDs(0) = 244

'Declare the return variable, call the service, and 
'output the name of the found CountryRegion
Dim myCountryRegionInfos() As CountryRegionInfo
myCountryRegionInfos = commonService.GetCountryRegionInfo(entityIDs)
Console.WriteLine(myCountryRegionInfos(0).FriendlyName)

 
[C#]
//This example assumes that the MapPoint Web Service 
//namespace has been imported
         
//Instantiate the service variable and set up the Entity ID array
CommonServiceSoap commonService = new CommonServiceSoap();
int[] entityIDs = new int[1];
entityIDs[0] = 244;

//Declare the return variable, call the service, and 
//output the name of the found CountryRegion
CountryRegionInfo[] myCountryRegionInfos;
myCountryRegionInfos = commonService.GetCountryRegionInfo(entityIDs);
Console.WriteLine(myCountryRegionInfos[0].FriendlyName);


 

See Also

CommonServiceSoap Class | CountryRegionInfo Class | Entity.ID Property | CountryRegion Entity IDs