WebClient用法

            WebClient client = new WebClient();
string stockCodes = "sh601169,sz000948,sh601398,sz002114";
string zs = "s_sh000001,s_sz399001";
while (true)
{
string reply = client.DownloadString(
string.Format("http://hq.sinajs.cn/list={0}", stockCodes));
Console.WriteLine(reply);
reply = client.DownloadString(
string.Format("http://hq.sinajs.cn/list={0}", zs));
Console.WriteLine(reply + " " + DateTime.Now.ToString());
System.Threading.Thread.Sleep(5000);
}
posted @ 2010-05-14 15:52  joe62  阅读(834)  评论(0编辑  收藏  举报