单例模式的创建:

public class Myclass

{

  private Myclass()

     {

      }

      public static Myclass Instance

     {

          get
            {
                if (_instance==null||_instance.IsDisposed)//窗体应用程序才有IsDisposed
                {
                    _instance=  new MemberForm();
                }
                return _instance;
            }

      }

 

}

posted on 2016-09-20 16:10  跨界农民工  阅读(155)  评论(0编辑  收藏  举报

导航