An enum is a special "class" that represents a group of constants (unchangeable/read-only variables). C++11 has introduced enum classes (also called scoped enumerations ), that makes enumerations both strongly typed and strongly scoped. Bond Copy Code. Enumerations The main objective of enum is to define our own data types (Enumerated Data Types). null not "null" Note that null must be explicitly included in the list of enum values. Enum Example | Enumeration (or enum) in Nullable enums. If we were to use struct definition, we would have to create multiple structs. To define enum class we use class keyword after enum keyword. Python In computer programming, an enumerated type (also called enumeration, enum, or factor in the R programming language, and a categorical variable in statistics) is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type. 1. C# Enum: Definition, Examples, Best Practices, and Pitfalls