Is the type enum class a completely separate from a traditional class, or is its implementation similar? How does enum class work? The reason I ask is because I don’t understand how it can be similar to both a class and an enum at the same time. I assume an enum class cannot have a constructor, or internal methods?
Is the type enum class a completely separate from a traditional class, or is
Share
It’s related to an ordinary
enumin that it consists of a set of names for constant values. It’s related to aclassin that the names are all contained within the scope of the type’s name. So: