导航

2017年8月8日

摘要: Monitor对象 1.Monitor.Enter(object)方法是获取锁,Monitor.Exit(object)方法是释放锁,这就是Monitor最常用的两个方法,当然在使用过程中为了避免获取锁之后因为异常,致锁无法释放,所以需要在try{} catch(){}之后的finally{}结构体 阅读全文

posted @ 2017-08-08 23:35 清浅ヾ 阅读(462) 评论(0) 推荐(0)

摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace 单例模式 7 { 8 class Studnet 9 { 10 public string id { get; set; } 11... 阅读全文

posted @ 2017-08-08 23:14 清浅ヾ 阅读(113) 评论(0) 推荐(0)

摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Collections.Concurrent; //引用命名空间 6 using System.Threading; 7 using System.Di... 阅读全文

posted @ 2017-08-08 22:13 清浅ヾ 阅读(127) 评论(0) 推荐(0)

摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace 原型模式 7 { 8 /// <summary> 9 /// 原型类 10 /// 阅读全文

posted @ 2017-08-08 00:45 清浅ヾ 阅读(102) 评论(0) 推荐(0)