public static SingleT getSingleT() { if (instancia == null) { instancia = new SingleT(); } return(instancia); }
private static void TestSinglenton() { SingleT myConect = SingleT.getSingleT(); //SingleT myConect2 = SingleT.getSingleT(); myConect.conectar(); myConect.desconectar(); //myConect2.conectar(); //myConect2.desconectar(); var ret = myConect.GetType(); Console.WriteLine(ret); Console.ReadKey(); }