文章分类 -  C#

async & await 的前世今生(Updated)
摘要:async & await 的前世今生(Updated) async 和 await 出现在C# 5.0之后,给并行编程带来了不少的方便,特别是当在MVC中的Action也变成async之后,有点开始什么都是async的味道了。但是这也给我们编程埋下了一些隐患,有时候可能会产生一些我们自己都不知道怎 阅读全文
posted @ 2016-08-02 21:44 俗剑仙·情如梦 阅读(91) 评论(0) 推荐(0)
C#控制台关闭事件
摘要:1 using System; 2 using System.Runtime.InteropServices; 3 using System.Threading; 4 5 namespace ConsoleApp1 6 { 7 public delegate bool ControlCtrlDelegate(int ctrlType); 8 9 public... 阅读全文
posted @ 2016-07-20 13:43 俗剑仙·情如梦 阅读(1046) 评论(0) 推荐(0)