日期:2014-05-18 浏览次数:20798 次
static void Main(string[] args) { while (true) { WebResponse webResponse = WebRequest.Create("******").GetResponse(); if (webResponse != null) { StreamReader streamReader = new StreamReader(webResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("GB2312")); streamReader.ReadToEnd(); } Console.WriteLine(times++ + " " + Thread.CurrentThread.ManagedThreadId); } Console.ReadLine(); }
static void Main(string[] args) { while (true) { WebResponse webResponse = WebRequest.Create("******").GetResponse(); if (webResponse != null) { StreamReader streamReader = new StreamReader(webResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("GB2312")); //streamReader.ReadToEnd(); } Console.WriteLine(times++ + " " + Thread.CurrentThread.ManagedThreadId); } Console.ReadLine(); }