摘要: 在程序用调用 Http 接口、请求 http 资源、编写 http 爬虫等的时候都需要在程序集中进行 Http 请求。 很多人习惯的 WebClient、HttpWebRequest 在 TPL 下很多用起来不方便的地方,TPL 下推荐使用 HttpClient(using System.Net.H 阅读全文
posted @ 2017-10-12 15:37 大胖儿在努力 阅读(1970) 评论(0) 推荐(0) 编辑
摘要: 线程池 1 static void Main(string[] args) 2 { 3 ThreadPool.QueueUserWorkItem(state => 4 { 5 for (int i = 0; i < 50; i++) 6 { 7 Console.WriteLine(i); 8 } 9 阅读全文
posted @ 2017-10-12 11:38 大胖儿在努力 阅读(193) 评论(0) 推荐(0) 编辑