0% found this document useful (0 votes)
17 views

Visual Basic Naming Conventions Naming Conventions For Constants and Variables

Visual Basic uses naming conventions for variables, constants, and objects to make code more readable and maintainable. Variable and constant names are in mixed case with an all-lowercase prefix indicating the data type, like "dblInterestRate". Object names also use mixed case with a prefix for the object type, such as "cmdExit" for a command button. The document provides examples of common data type and object prefixes.

Uploaded by

Rey Rese
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Visual Basic Naming Conventions Naming Conventions For Constants and Variables

Visual Basic uses naming conventions for variables, constants, and objects to make code more readable and maintainable. Variable and constant names are in mixed case with an all-lowercase prefix indicating the data type, like "dblInterestRate". Object names also use mixed case with a prefix for the object type, such as "cmdExit" for a command button. The document provides examples of common data type and object prefixes.

Uploaded by

Rey Rese
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Visual Basic Naming Conventions Naming conventions for constants and variables.

The identifiers of constants and variables should be descriptive and in mixed case, using capital letters for the beginning of each word, with no spaces between the words. Identifiers should have an all-lowercase prefix that indicates the t pe of data stored.

T pe
Boolean Currenc "ouble Integer #ong $ingle $tring %ser-defined

!refix
bin cur dbl int lng sng str udt

Naming Conventions for ob&ects


The name propert for an ob&ect should be descriptive and in mixed case, using capital letters for the beginning of each word, with no spaces between words. 'b&ect names should have an all-lowercase prefix that indicates the ob&ect t pe. ()*+!#(, a button used to exit a program could be named cmdExit .

'b&ect
chec- box combo box command button common dialogue data ob&ect director list drive list file list frame form image label line list box multimedia '#( option button picture box shape text box timer

!refix
chk cbo cmd cdl dat dir drv fil fra frm img lbl lin lst mmc ole opt pic shp txt tmr

You might also like