public static singleton make_instance()
      {
          if (instance == null)
          {
              instance = new singleton();
              Console.WriteLine("newly made");
              instance.name = "khan";
          }


          return(instance);
      }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            singleton f = singleton.make_instance();

            Console.Write(f.getname());
        }