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(); }
public static Singletom getInstance() { if (instance == null) { instance = new Singletom(); return(instance); } else { return(instance); } }