| | wers verwenden will und ned weiß wie - wird hier geholfen ^^
public sealed class BusinessLogic {
// private Konstruktor aufrufen
private static readonly BusinessLogic instance = new BusinessLogic();
// Property zum Zugriff
public static BusinessLogic Instance
{ get { return instance; } }
// Konstruktor (private!)
private BusinessLogic() {
data = new DataLayer();
// ...
}
}
// Zugriff (aus der GUI bzw. ASP) zb:
BusinessLogic.Instance.Funktion();^
ps: namespace sollte identisch sein. |