Visual Basic 2008 Programming: Business Applications with a Design Perspective
Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9
Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Appendix A Appendix B Appendix C Home
Loading
Last change: February 13 2016 18:48:19.

 Chapter in PDF

Chapter 2: Visual Basic Programming Concepts
Last change: February 13 2016 18:48:07.
<<PreviousNext>>

Object Naming Convention

Companies adopt naming standards for their projects, and these standards typically include rules on how objects should be named. A commonly used standard is to use the first three letters in lowercase to indicate the type of object, followed by a descriptive name. For example, the three objects used in this chapter—form, label, and button—have the following name prefixes:

Object Prefix Example
Form frm frmWelcome
Label lbl lblWelcome
Button btn btnQuit

A more complete list of these prefixes is given in the next chapter. These prefixes will be referred to and used whenever a new object is encountered. In this book, this standard will be followed to help you develop a sound naming habit.

Tip
When naming objects, make the names as descriptive as you can. Include the standard three-letter prefix as a part of their names. Code clarity and maintainability are greatly enhanced with this practice.
Last change: February 13 2016 18:48:11.
<<PreviousNext>>