What naming conventions should I use in naming variables, classes, Namespaces, etc? Microsoft has once again redefined the standard naming conventions with the advent of .NET.
Instead of being critical of Microsoft, which I am not doing, this article is being written simply to point out that Naming Conventions that we have used in the past, and many of which we learned from Microsoft, have once again been redefined.
Before Strict Typing was enforced, or even necessarily encouraged in Visual Basic, Microsoft and others were suggesting, if not pushing, certain standards for variable names, classes, Forms, and Control names. Not only did we name the variable, but we also indicated Scope and Type as part of the variable name. Take a look at some of the following examples:
Depending on how fond of or how good you were at typing, you would use
| Dim strLastName As String Dim intPageCounter As Integer Dim dblCurrentValue As Double |
| Dim sLastName As String Dim iPageCounter As Integer Dim dCurrentValue As Double |
| Dim lsLastName As String Dim liPageCounter As Integer Dim ldCurrentValue As Double |
| Private mlngLineCount As Long |
| Private m_lngLineCount As Long |
| Dim LastName As String |
| Dim firstName As String |