Hello,
I am sorry if I sound a little bit nit-picking, but I (still) have problems figuring out what name to assign to variables. Therefore, I would like to hear what some of you are doing, if that's allright.
IMO, I use three sorts of variables:
*** local (private) class variables**
I declare these as: private nameValue as type
Public properties of such variables are declared as Name().
For example:
private dogValue as Dog
Public Property Dog() as dog
....etc
*** local method variables**
I declare these as: dim name as type
For example:
dim dog as Dog
*** parameter variables**
I declare these as: byval name as type
For example:
Public sub Shave(byval dog as Dog)
I think the first and the third are good ones. However, IMO the second is not, as you now have an object named after a type. Though, most of the time you can think of a better name such as Sparky: dim sparky as Dog. But sometimes you can't. For example, some "abstract" object like a "FileChecker". I can't think of any other name for it! So now I am doing: dim fileChecker as FileChecker, which can be confusing sometimes. I could however name it something like fileCheckerObject, fileCheckerObj, fileCheckerInstance, fileCheckerValue, etc, but hey... would that really clarify things up? So.... again: how do YOU name your variables, especially the second ones!?