Created
October 15, 2013 23:11
-
-
Save Fhernd/7000074 to your computer and use it in GitHub Desktop.
Implementación clásica del patrón de diseño singleton en C#.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class ConexionBDSingleton | |
{ | |
private static readonly ConexionBDSingleton conexion = new ConexionBDSingleton(); | |
private ConexionBDSingleton() | |
{ | |
// sentencias de creación de la conexión a la BD. | |
} | |
public static ConexionBDSingleton Conexion () | |
{ | |
get | |
{ | |
return conexion; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment