笨小孩做开发

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
    private static WorkFlow instance = null;
        private static readonly object syncObj = new object();
        /// <summary>  
        /// 创建实力
        /// </summary>
        public static WorkFlow Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (syncObj)
                    {
                        if (instance == null)
                        {
                            instance = new WorkFlow();
                        }
                    }
                }
                return instance;
            }
        }
posted on 2015-03-13 08:54  笨小孩做开发  阅读(109)  评论(0编辑  收藏  举报