Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's a Singleton?
Message
De
15/08/2009 12:41:57
 
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Divers
Thread ID:
01417218
Message ID:
01418245
Vues:
78
>Why not just create a static class?

Short answer: it depends on what purpose the class serves.

In Tim's case, his class needs to be an instance rather than static, because his instance fires events, etc. That wouldn't work with a static class.

But, as Tim also says, the Singleton pattern seems to be overused. <g> So, did you have some particular use in mind or is this just a generic question?

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform