What's the correct way of naming private variables in a class?
mVarName?
myVarName?
m_VarName?
which one should I use? ( I know it doesnt make a big difference, but I'de like to know which is the most popular one anyways:D)
What's the correct way of naming private variables in a class?
mVarName?
myVarName?
m_VarName?
which one should I use? ( I know it doesnt make a big difference, but I'de like to know which is the most popular one anyways:D)
It doesn't matter at all really. I think m_VarName stems from C/C++ where private variables are sometimes called member variables hence the m_. I liked that and used it in VB6 but now I meanly use just _ so it'd be _VarName. But really I think the only thing that matters is that you stick to a pattern so its easier to read your code. So no matter what you pick just ALWAYS use that and build consistantance.
oooh that's a good one... I'm not consistant at all! thanks, I'll try:DQuote:
Originally posted by Edneeis
build consistantance.