2020年11月15日

摘要: /// <summary> /// 实现在线程池中实现取消异步操作效果 /// </summary> /// <param name="args"></param> static void Main(string[] args) { /** * AsyncOperations1 通过轮询的方式去查询 阅读全文
posted @ 2020-11-15 22:50 Mr_Height 阅读(240) 评论(0) 推荐(0)
 
摘要: 阅读全文
posted @ 2020-11-15 22:42 Mr_Height 阅读(151) 评论(0) 推荐(0)
 
摘要: static void Main(string[] args) { /** * 如何向线程池中放入异步操作 * 1.调用AsyncOperation方法,未传递参数 * 2.调用AsyncOperation 传递 state参数 * 3.定义一个lambda方法并向内部传递state参数 * 4.使 阅读全文
posted @ 2020-11-15 22:40 Mr_Height 阅读(100) 评论(0) 推荐(0)

2020年11月8日

摘要: Product product = new Product(); IList<Product> products = product.GetProducts(); //返回序列中的第一个元素,但是如果序列为空 则会报错 "序列中不包含任何元素" products.Where(o => o.Price 阅读全文
posted @ 2020-11-08 00:00 Mr_Height 阅读(93) 评论(0) 推荐(0)

2019年9月23日

摘要: /// <summary> /// Ilist<T>转换成DataTable /// </summary> /// <typeparam name="T"></typeparam> /// <param name="list"></param> /// <returns></returns> pub 阅读全文
posted @ 2019-09-23 18:28 Mr_Height 阅读(267) 评论(0) 推荐(0)