Protected property are only visible to the class and all subclass of it.
Hidden property are only visible to the class itself. Not even the subclass cann see them.
Yes, it's a better choice to scope the property to were it's used. If a property will be only used by the class, it should be made protected or hidden to keep the interface simpler and prevent other process to access/modify the property.
> What is the differences betw proteced and hidden property? Should I set all of myproperty which is only used in myclass as proteced or hidden?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement