Share via


CountryRegionInfo.LatLong Property

CountryRegionInfo.LatLong Property

The latitude and longitude coordinates (LatLong object) of a country/region entity.


Public LatLong As LatLong


[C#]

public LatLong LatLong;

Example

[Visual Basic]

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

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