Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where To Create Enums
Message
De
02/04/2010 15:45:15
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01458451
Message ID:
01458552
Vues:
44
>Use Singleton.
>
> Best regards

How does a singleton help with this? I use singletons when I have a class that is needed multiple places in my application but I can only have one instance of that class instantiated. I do work with RFID readers, Cameras, scales, and GPS devices that are connected to a Com port and the class can only be connected once but I need to access the instantiated class in several different places in the application.

Project common functionality like Viv suggested could go in a seperate project such as MyProject.Common where all the common stuff goes and can be referenced by any of the projects without concern of cyclic references.
Tim
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform