上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 63 下一页
摘要: class DictionaryExample { public static void Main() { Dictionary<int, string> dicStudents = new Dictionary<int, string>(); dicStudents.Add(1, "李刚"); dicStudents.Add(2, "黄何军"); dicStudents.Add(3, "方如波"); dicStudents.Add(4, "陆前霖"); dicStudents.Add(5, 阅读全文
posted @ 2013-04-02 19:24 Predator 阅读(250) 评论(0) 推荐(0) 编辑
摘要: GC.Collect()//强制垃圾回收器立即回收GC.SuppressFinalize(this)//请求系统不要调用指定对象的终结器 阅读全文
posted @ 2013-04-02 19:23 Predator 阅读(115) 评论(0) 推荐(0) 编辑
摘要: class ServiceException:Exception { private string message; public ServiceException() : base() { } public ServiceException(string msg) : base(msg) { this.message = msg; } public ServiceException(string msg, Exception InnerException) : base(msg, InnerException) { this.message = msg; } } 阅读全文
posted @ 2013-04-02 19:22 Predator 阅读(157) 评论(0) 推荐(0) 编辑
摘要: /volidatile关键字的使用,动手便代码实例操作class SchoolBus { volatile private bool isAlive;//关键字volatile表明该变量是活动的,确保在每一个线程在访问isAlive在每一个时刻都能得到最新的值 public SchoolBus(bool isAlive) { this.isAlive = isAlive; } public void Start() { Console.Write("The school bus is starting..."); Thread.Sleep(3000); Running(); 阅读全文
posted @ 2013-04-02 19:21 Predator 阅读(220) 评论(0) 推荐(0) 编辑
上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 63 下一页