static void Main(string[] args)
        {
            Singleobjects uno = Singleobjects.getInstance();

            uno.seta("La ciudad es");
            uno.showMessage();
            Singleobjects dos = Singleobjects.getInstance();

            dos.seta("La temperatura es: ");
            uno.showMessage();
            Console.ReadKey();
        }
示例#2
0
 public static Singleobjects getInstance()
 {
     if (instance == null)
     {
         instance = new Singleobjects();
         return(instance);
     }
     else
     {
         return(instance);
     }
 }