I have seen too much C# and C++ code where the variable naming convention seems to ask programmers to write variable names using underscore before the text of the variable. e.gr.
int? _countMoney;
What’s the rationale supporting that convention?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In C# I usually prefix with
_private fields but never local variables. The rationale behind this is that when I need a private variable I type_and the Intellisense filters the list and it is easier to find. This way I am also able to distinguish between private from local variables and I no longer need to typethis.variablenamefor class fields but simply_variablename.