What does m_ represent?

C

clintonG

J

Jon Skeet

clintonG said:
A class? A method?
I need an explanation regarding which context this naming convention
may be used and any alternative representations please...

Usually it means "member". So, for instance you might have:

public class Test
{
string m_name

public Test (string name)
{
m_name = name;
}
}

It allows you to distinguish between local fields and member fields.
Personally I prefer to do that by keeping methods short enough to avoid
confusion in the first place.
 
S

skicougar

m_ should be a prefix to help describe a variable as a
member. would have to see the code to know for sure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top