I have a naming strategy for denoting the nature of code entity (variable, method, etc.) which accounts for the most common permutations of scope, entity type, and mutability, but I have not been able to choose a way of denoting private static member fields (not properties).
What are some recommended ways of denoting this?
Update: For what it's worth, I do understand that this has fallen out of fashion, and that for C# particularly, Microsoft argues against it. I should specify that my goal in this is not to provide a level of "documentation", but simply to be able to get as much information as possible with as little motion and cross referencing as possible.
Personally I feel it would be ideal if identifiers could be restricted to conveying information about purpose, and leave code context information to the IDE to convey. However, since VS2008 does not appear to provide highlighting/styling options which are based on scope or mutability, and I don't feel that tooltips are particularly efficient in this because of the required mouse motion and waiting, I find myself limited in my options.
For reference, I primarily program in C#, and below is a sampling of my current naming conventions:
- Method argument or local variable: thisIsMyVariable
- Instance-level private field: _thisIsMyVariable
- Public instance- or class-level property or method: ThisIsMyVariable
- Constant: THIS_IS_MY_VARIABLE
For private static fields I've been considering these:
- s_thisIsMyVariable
- _ThisIsMyVariable