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?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only