Peter Ritchie
Matthew Watson wrote: |
Personally, I prefer prefixing rather than suffixing (if I do it at all).
The reason Simple! If you view a class in the class diagram tool, or the "members" list, it sorts things in alphabetical order.
If you start all the buttons with "button", then they'll all be together in the list.
| |
That's not alphabetical order, that's grouping. Handy, yes, if you want to group all your buttons together. But, if you want to deal with all the variables relating to a TextBox (like the label, event handlers, the control, etc.) then they'd be all over the place. Suffixing puts all the related variables together, like totalTextBox, totalLabel, totalLabel_Click, totalTextBox_TextChanged, etc.
I never need to see all the textboxes grouped together...