Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private array vs array property?
Message
 
 
To
19/09/2009 06:54:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01425197
Message ID:
01425250
Views:
47
>>Hi,
>>
>>I need to use an array in a couple of methods of a class. I can declare it private and therefore the array will be in scope everywhere I need to. Or I can make this array to be a property of the class (custom class). Speed is not important to me (in this particular case). But I wonder what would VFP clean-up (destroy) better, a private array or array property?
>>
>>Thank you for any suggestions.
>
>To share variables, array or otherwise, between different class methods, I would also use a property. Where would you declare the variable private, anyway? If you declare it in Init(), it will go out of scope as soon as Init() finishes. You would have to declare it outside the class, I believe.

Thank you, Hilmar. I will be using this array as a property.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform