Share via


CommonServiceSoap.GetCountryRegionInfo Method

CommonServiceSoap.GetCountryRegionInfo Method

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


Public Function GetCountryRegionInfo
 (entityIDs As System.Integer() ) As CountryRegionInfo()
    

[C#]

public CountryRegionInfo[]
 GetCountryRegionInfo ( System.Int32[] entityIDs );
    

Parameters

  • entityIDs
    Optional. An array of integers representing the Entity.ID property of the countries/ regions for which information is returned. The array can contain up to 500 items.

Remarks

  • If you pass a null value for the entityIDs, the CountryRegionInfo objects for all countries/regions are returned.

  • The length of the CountryRegionInfo[] array that is returned is the same as the length of the entityIDs[] array that is passed in.

  • If an integer in the entityIDs array does not represent a valid country/region entity ID, the CountryRegionInfo.EntityID for that integer contains the passed integer, and all other CountryRegionInfo properties for that integer are null.

    For more information about entity IDs for countries/regions, see

    CountryRegion Entity IDs.

Example

[Visual Basic]

'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#]

//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