Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

The following C# code defines an enumeration.

enum MyEnum

As a whole it is called an enumeration. What do you call each item? For example, what do you call the object that is beta?

share|improve this question

closed as primarily opinion-based by gnat, durron597, GlenH7, Ixrec, Snowman Sep 1 at 20:38

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

You called it an element in your question. – compman Mar 11 '11 at 19:20

5 Answers 5

up vote 12 down vote accepted

In computer programming, an enumerated type (also called enumeration or enum) is a data type consisting of a set of named values called elements, members or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language. A variable that has been declared as having an enumerated type can be assigned any of the enumerators as a value.

share|improve this answer

A member or element of MyEnum.

share|improve this answer
+1 I call it an element, which I believe is the "official" term for them, at least in C#. – CodexArcanum Mar 11 '11 at 16:31

I simply call it a value of the enum, probably not very scientifically accurate but everyone understands it.

share|improve this answer

I would call it a constructor since enums basically are algebraic data types, although all constructors are nilladic in C# (as opposed to F# for example).

share|improve this answer
Hmmm... I know FP, but that doesn't sit right with me. An ADT can act as an enum, but I don't think it goes the other way. An enum is really a shorthand for a series of constants: you don't construct anything but they often have a directly mapped value underlying them. I don't find it wrong enough to warrant a -1 (it's an interesting thought at least) but I don't think it's very accurate. – CodexArcanum Mar 11 '11 at 16:34

Item Just seems to come naturally.

share|improve this answer

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