textBoxEmployeeName vs employeeNameTextBox

后端 未结 16 954
死守一世寂寞
死守一世寂寞 2020-12-16 00:11

Which naming convention do you use and why?

I like to use employeeNameTextBox, because:

  • It seems more natural from an English language perspective.
16条回答
  •  离开以前
    2020-12-16 00:59

    WPF-specific Answer: No name at all.

    Why? Because if you're developing using WPF you should not be naming your controls. If you are, you are doing something wrong.

    WinForms required controls to be named because its data binding was so weak. WPF solves all that: The control itself can specify its data and behavior, so there is no need to name it.

提交回复
热议问题