随笔 - 35  文章 - 0  评论 - 121  阅读 - 56623
08 2009 档案
设计模式学习体会之单点模式
摘要:单点模式,适用于那种需要先实例化,但是实例化以后应用程序域内只需唯一实例那种场景。网上摘来的大致代码如下:public class Singleton{ Singleton() { } private static Singleton _instance = null; public static Singleton Instance { get { if (_instance == null) _instance = new Singleton(); return _instance; } } } 看到这里我立马想到了我新学习使用mvc.net项目里的dbcontenxt对象,我认为这个db 阅读全文
posted @ 2009-08-11 18:34 lindping 阅读(433) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示