示例#1
0
        static void Main(string[] args)
        {
            Singletom uno = Singletom.getInstance();

            uno.seta("buenos dias");
            uno.showMessage();
            Singletom dos = Singletom.getInstance();

            dos.seta("buenas tardes");
            uno.showMessage();
            Console.ReadKey();
        }
示例#2
0
 public static Singletom getInstance()
 {
     if (instance == null)
     {
         instance = new Singletom();
         return(instance);
     }
     else
     {
         return(instance);
     }
 }