MySQL_City.cs

using System;
using System.Collections.Generic;
using System.Text;

namespace CityList
{
    class Program
    {
        static void Main(string[] args)
        {
            RootElementNameService cityService;
            GroupElementNameKeyType key;
            RootElementNameElementType result;
            GroupElementNameType[] aCity;

            key = new GroupElementNameKeyType();
            key.ID = "305*";

            cityService = new RootElementNameService();

            try
            {
                result = cityService.list(key);
            }
            catch (SystemException ex)
            {
                Console.WriteLine("exception: " + ex.Message);
                return;
            }
            
            aCity = result.RootElementName;

            if (aCity.Length > 0)
            {
                Console.WriteLine("Number of Cities returned: " + aCity.Length);
            }

            for (int i = 0; i < aCity.Length; i++)
            {
                Console.WriteLine("City [" + i + "], ID=" + aCity[i].ID
                    + " Name = " + aCity[i].Name
                    + " CountryCode = " + aCity[i].CountryCode
                    + " District = " + aCity[i].District
                    + " Population = " + aCity[i].Population );
            }
        }
    }
}