Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory used by Objects
Message
De
24/09/1999 11:22:13
 
 
À
24/09/1999 11:12:12
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00268505
Message ID:
00268533
Vues:
27
Yes. A public variable can be changed by any procedure or method, making it difficult to debug. A property is encapsulated inside a class and the class can control who can access the properties and who can change it. You can even hide it completly and make the user access it's value by methods only.

I don't use PUBLIC variables anymore since VFP 3.0. I don't use many PRIVATE variables either. Eevrything is either LOCAL or a class property.
>So do you mean to say that it is better to have an object with 100 properties instantiated rather than having 100 public/global variables in the main program?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform