Enumerations provide a way to define symbolic constants that belong together in a logical fashion. Two different uses exist. One is to represent constants that represent distinct values, such as values
DayOfWeek.Sunday. It doesn’t make sense to try to combine two such values into a new one.
The second use is with flags, where values can be combined meaningfully. For instance, consider file I/O access modes
FileAccess.Write, which are very useful when combined to open a file for read and write.
Where logical operators come into play is with flag-based enums. Enumerations have an underlying integral type, and each member of the enumeration has a value of that type. By declaring those ...