jrvbdeveloper
Member
- Joined
- Jul 15, 2007
- Messages
- 17
- Programming Experience
- Beginner
Hi,
With regards to best practice, I was just wondeirng whether it is better within a class to refer to the property name or its underlying variable?
For example, lets say I have a public property called ItemCount. This property returns a private variable called iNumItems. Outside of the class, if I needed the number of items I would use ItemCount. Within the same class, should I be using "ItemCount" or "iNumItems"?
Thanks.
With regards to best practice, I was just wondeirng whether it is better within a class to refer to the property name or its underlying variable?
For example, lets say I have a public property called ItemCount. This property returns a private variable called iNumItems. Outside of the class, if I needed the number of items I would use ItemCount. Within the same class, should I be using "ItemCount" or "iNumItems"?
Thanks.