Directives

4.1 Prefix all constants with c_ and a scope designator.

In the past, one convention for denoting a constant was to use all uppercase letters for the constant’s name. For instance, when you created a constant to store a column index in a grid, you would use a statement like this:

							Const COLUMN_INDEX = 7

Typing anything in code in all uppercase letters is now considered antiquated and undesirable. Mixed-case text (also referred to as camel casing) is much easier to read. However, because variable and procedure names are also entered in mixed case, it’s still important to denote when an item is a constant. A better convention is to prefix the constant name with c_. For example, the constant shown above would be declared like this: ...

Get Practical Standards for Microsoft® Visual Basic® .NET, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.