"Internet User" <no*****@noemail.comschrieb:
>I see m_ prefixed in front of variable names all the time in code for
classes. Is this a coding convention and if so how does one describe the
type of variables it is used with?
'm_' is typically used to mark private variables in order to make their
scope more visible and to prevent name clashes with the class' public
properties. Imagine a class having a 'UserName' property. The property's
value could be stored in a private "backing field" named 'm_UserName', for
example.
To me the 'm' stands for "module-level" (module = module, structure, class)
opposed to 'g' which stands for "global" (and which I am using almost
never).
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>