Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preventng direct creation of sub-class instances
Message
 
À
28/07/2006 10:09:56
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01141060
Message ID:
01141114
Vues:
19
Cetin is right.
if you mark your constructor as either protected or private and provide a factory method (static) to get an instance of the object, it will solve you rproblem.

{
protected MyClass(){;}
public static MyClass getMyClass(param){return new MyClass();}
}
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform