1

I'm having a terrible time communicating with my teammates when I talk about enums. I can never properly differentiate what part of the enum I'm talking about.

enum PowerLevel {
    Low,
    Medium,
    High
}

Low, Medium, and High are what part of the enum?

What part is PowerLevel?

2 Answers 2

2

I say that "Powerlevels" is the name of the enumeration. "Low", "Medium" and "High" are the members of the enumeration. These are also sometimes called named constants or elements.

This page actually uses all three names: http://msdn.microsoft.com/en-gb/library/sbbt4032(v=vs.80).aspx

1

The enum is powerlevels. It has three different values/instances : low, medium and high.

Low is an instance of powerlevels and is guaranteed to be a singleton.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.