[Web Client using Console]
> Wsdl http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?WSDL
Copy WeatherWebService.cs to Solution and add it
using System;
using System.Collections.Generic;
using System.Text;
namespace weather
{
class Program
{
static void Main(string[] args)
{
string strName = null;
if (args.Length > 0) strName = args[0];
else strName = "上海";
WeatherWebService wws = new WeatherWebService();
string[] info = wws.getWeatherbyCityName(strName);
Console.WriteLine("省份:/t/t{0}", info[0]);
Console.WriteLine("城市:/t/t{0}", info[1]);
Console.WriteLine("最后更新时间:/t{0}", info[4]);
Console.WriteLine("今日气温:/t{0}", info[5]);
Console.WriteLine("明日气温:/t{0}", info[12]);
Console.WriteLine("后天气温:/t{0}", info[17]);
Console.ReadLine();
}
}
}

被折叠的 条评论
为什么被折叠?



