Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Q: read-only property, the shortest implementation?
Message
 
À
23/07/2004 23:46:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00927230
Message ID:
00927584
Vues:
26
>>Hiya Steve,
>>>
>>>For some reason he has said that he needs it to be a property...not retrieved by a method. Slam dunk in C# :)
>>
>>Yeah, but IMO, the best practice is to create an interface for the property. This promotes information hiding. The outside world doesn't need to know anything about the object except its interface. This way, the internals can change without breaking any existing code.
>>
>
>Right, but don't assign & access methods take care of that? I'm curious why they they may not be appropriate for this situation.

I don't think so. Access and assign are meant for public properties. Not one's that meant to be hidden or protected.

>>BTW, for an undetermined period of time, I'll be off the UT during most regular working hours (8-5 ET). If you, or anyone else, wants my feedback here, please send me an email indicating the thread number. Basically, I'll be on-line for short periods (I'm using dial-up) after 8PM Monday through Wednesday, after 4PM Thursdays and after 5PM Fridays. I'll check-in regularly over the weekends.
>>
>
>Thanks for the heads up...hope everything's going okay.

I don't want to sound arrogant. The reason I brought this up was because my name has appeared in a couple of thread titles recently. I just want folks to know that if I don't responded quickly, it's because, for the time being, I can't.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform