主要分成了那么几个步骤:
1.HTTP状态码
2.字典的导入
3.显示在listview控件当中
第一步:
先来实现HTTP状态码200的判断
try { req = (HttpWebRequest)WebRequest.CreateDefault(new Uri("http://www.baidu.com/fuck.fuck")); req.Method = "GET"; req.Timeout = 2000; res = (HttpWebResponse)req.GetResponse(); String statusCode = res.StatusCode.ToString(); messagebox.show("this is 200") } messagebox.show("这个不是200"); }